Add Nginx doc configuration

This commit is contained in:
Zach Borboa
2014-07-02 22:22:42 -07:00
parent 8540eac405
commit 9fb5a93a09
2 changed files with 38 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/php;
index index.php index.html;
server_name localhost;
location / {
try_files $uri $uri/ /index.php =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
+18
View File
@@ -0,0 +1,18 @@
server_tokens off;
server {
listen 80;
server_name phpcurlclass.com;
return 301 http://www.phpcurlclass.com$request_uri;
}
server {
listen 80;
server_name www.phpcurlclass.com;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}