Author Topic: nginx setup  (Read 2506 times)

0 Members and 1 Guest are viewing this topic.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
nginx setup
« on: July 19, 2013, 02:04:47 pm »
So, i noticed that suddenly my jukebox of radio.omnimaga.org is offline
well, i somehow need to set nginx up correctly
this is my current setup:
Code: [Select]
server {
    listen 80;
    server_name radio.omnimaga.org radio.ourl.ca;
    root /home/sorunome/RadioOmnimaga/web;
    location / {
        proxy_pass http://radio.omnimaga.org:8000;
        proxy_set_header X-Real-IP $remote_addr;
    }
    location ~(.*)\.php$ {
        fastcgi_pass  localhost:9000;
        fastcgi_param SCRIPT_FILENAME
                      $document_root$fastcgi_script_name;
        include       fastcgi_params;
    }
    location ~ "^(.{1,3}|(.*[^.][^p][^h][^p]))$" {
        proxy_pass http://radio.omnimaga.org:8000$1;
        proxy_set_header X-Real-IP $remote_addr;
    }


}
The trick is that .php files will be executed in the root directory and will NOT be redirected to that port 8000 thingy which somehow seems to happen :(
on the php files it just gives 'file not found' which is (i guess) the 404 of the :8000 thingy

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!