0

this is my very first question here, so please be clement.

I have been programming for weeks a web site with both PHP and JAVASCRIPT, and I also use nodeJs with socket.io and express. When I tested my localhost locally (on a linux Debian), I configured my app.js to work on the port 3000. Thus, there was no conflict between Apache (which is already working on port 80) and NodeJs, and everything worked well. But since yesterday, I've attempted for the first time to host my website, and of course NodeJs didn't work anymore (I think it's absolutely normal, because only the port 80 is listened, isn't it ?), but the rest of the website still worked. So, I did some research, and I've found a solution here which deals with proxy on Apache. Unfortunately, since I've done it, my browzer doesn't display my /index.php normally, instead of it, it tries to download index.php as a bin file. (some precisions : my app.js is configured to work with /game.php, not /index.php, but if I try to access to /game.php it shows : "Cannot GET /game.php")

I'm a little lost, I'm still struggling to search some informations by myself, but I know that I'm lacking knowledges

PS : Before to do this handling of the apache2.conf file, I attempted to "turn" the port 3000 to 80 by modifying /etc/rc.local with iptables, but the same problem returned : the web browzer only wants to DL the /index.php....

Thanks for have read, and sorry for my bad English. If you want more accurates details, ask me.

1 Answer 1

1

Your PHP config is messed up, you can tell any time you download instead of view them in your browser. If I had to guess I'd say that it has something to do with those virtual host blocks you added. Look up how to setup PHP with Apache, or ask your hosting provider for help. With the information you have provided, there is not much we can do for you as your question is not clear.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer, I host my web site from my house, and before I started to do these modifications, php was displayed perfectly. So I'm not sure that the problem comes from php configuration
Are you planning on having your site become popular? If so, every second you spend hosting from home is a waste of time. Eventually you'll have to switch. There are so many configuration and unnecessary technical issues that arise from taking your route (I know because I tried too) just give up man. Seriously.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.