Skip to content

Instantly share code, notes, and snippets.

@white-gecko
Last active October 13, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save white-gecko/4218833 to your computer and use it in GitHub Desktop.
Save white-gecko/4218833 to your computer and use it in GitHub Desktop.
NGINX configuration for Xodx
# This file belongs into /etc/nginx/sites-available and a link to it in /etc/nginx/sites-enabled
# if it doesn't work maybe remove the default configuration from /etc/nginx/sites-enabled
#
# make sure to adjust the root path "root /path/to/xodx/;" below
server {
# Make site accessible from http://localhost/
#server_name localhost;
listen [::]:80 default_server; # listen for ipv6 and ipv4
#listen 80 default_server; # if the ipv6 line doesn't work
# path to xodx
# !!! please adapt to fit your needs !!!
root /path/to/xodx/;
# where the logs should go
# !!! you can also adapt this as you want !!!
error_log /var/log/nginx/xodx-error.log;
index index.php;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# see also [1] for a UNIX socket configuration and some other details.
# [1]: http://library.linode.com/web-servers/nginx/php-fastcgi/ubuntu-10.04-lucid
location ~ \.php(.*)$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment