Skip to content

Instantly share code, notes, and snippets.

@iamkingsleyf
Created August 17, 2015 19:43
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 iamkingsleyf/118009209fc7ee432b2b to your computer and use it in GitHub Desktop.
Save iamkingsleyf/118009209fc7ee432b2b to your computer and use it in GitHub Desktop.
Nginx Domain conf
#And this one for your domain. $ sudo nano /etc/nginx/sites-available/your-domain.conf Again, change all your-domain.com to your domain.(I think you get it, right?)
server {
# Configure the domain that will run WordPress
listen 80;
listen [::]:80;
server_name skoopify.com;
error_log /src/www/skoopify.com/logs/error.log;
access_log /src/www/skoopify.com/logs/access.log;
# WordPress needs to be in the webroot of /src/www/your-domain.com/htdocs in this case
root /src/www/your-domain.com/htdocs;
# pass PHP scripts to Fastcgi listening on Unix socket
# Do not process them if inside WP uploads directory
# If using Multisite or a custom uploads directory,
# please set the */uploads/* directory in the regex below
location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php)) {
try_files $uri = 404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
include sites-available/common.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment