Skip to content

Instantly share code, notes, and snippets.

@eftakhairul
Created September 11, 2012 19:15
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 eftakhairul/3701130 to your computer and use it in GitHub Desktop.
Save eftakhairul/3701130 to your computer and use it in GitHub Desktop.
Nginx Virtual Host Configuration for www.example.com
server {
listen 80;
server_name www.example.com example.com;
#access_log /usr/share/nginx/html/example/logs/access.log;
#error_log /usr/share/nginx/html/example/logs/error.log;
location / {
root /usr/share/nginx/html/example;
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/example$fastcgi_scr$
}
}
@varaskkar
Copy link

How should the file be called and in what path should it be placed?

@eftakhairul
Copy link
Author

It should be at /etc/nginx/sites-available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment