Project

General

Profile

[OT] Execute PHP instead of download...

Added by axslinger99 almost 7 years ago

Greetings,

I'm a "lighty" noob so please bear with me.

I have lighty running on port 1080. It works great! I can access it via DDNS on the internet and that part is great.

My problem is, I wish to preview PHP pages in my web browser and I'm having a couple of issues. My 'home' directory is /var/www/html/. That's where my index.php file is. I also have a folder in there called ~html/includes. This is where I put my include files. The first issue is, I'm not sure how to put the address in my browser...

Ive tried http://localhost/include/:1080 and I get This site can’t be reached
localhost refused to connect.

Am I using the correct format? Also, when I have been able to browse to a folder using, file:/// format, my browser try to download the file rather than execute it.

Any help would be greatly appreciated.


Replies (1)

RE: Execute PHP instead of download... - Added by gstrauss almost 7 years ago

Please use a search engine to ask questions like "how do I access a website on an alternate port"

Please make a greater effort to answer your own questions.
https://en.wikipedia.org/wiki/Uniform_Resource_Locator
In your case, try: http://localhost:1080/include/

Any help would be greatly appreciated.

Please spend some more time reading the available documentation (see the search bar above), and also using your favorite search engine.

When accessing files via file:///... you are browsing directly on your local machine -- lighttpd is not involved -- so it is expected that any file that you click will view or download, depending on whether or not your browser recognizes the file.

    (1-1/1)