Skip to content

Instantly share code, notes, and snippets.

@e1senh0rn
Created September 1, 2009 08:00
Show Gist options
  • Select an option

  • Save e1senh0rn/178972 to your computer and use it in GitHub Desktop.

Select an option

Save e1senh0rn/178972 to your computer and use it in GitHub Desktop.
#dm@stronghold:~$ cat /usr/local/nginx/conf/sites/ads.mp3-online.com.ua
server {
listen 80;
server_name ads.mp3-online.com.ua;
# Main location
location / {
root /var/www/nginx/ads.mp3-online.com.ua/www/;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php last;
break;
}
}
location ~ \.php$ {
try_files $uri $uri/ @php;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/nginx/ads.mp3-online.com.ua/www/index.php;
# fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
location @php {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/nginx/ads.mp3-online.com.ua/www/$fastcgi_script_name;
# fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment