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.

Community
  • 1
  • 1
gZ Fab
  • 91
  • 1
  • 11

1 Answers1

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.

Dimwu
  • 45
  • 5
  • 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 – gZ Fab May 01 '16 at 11:21
  • 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. – Dimwu May 01 '16 at 13:44