Skip to content

Commit 9fb5a93

Browse files
committed
Add Nginx doc configuration
1 parent 8540eac commit 9fb5a93

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

docs/nginx/default

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
server {
2+
listen 80 default_server;
3+
listen [::]:80 default_server ipv6only=on;
4+
5+
root /usr/share/nginx/php;
6+
index index.php index.html;
7+
8+
server_name localhost;
9+
10+
location / {
11+
try_files $uri $uri/ /index.php =404;
12+
}
13+
14+
location ~ \.php$ {
15+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
16+
fastcgi_pass unix:/var/run/php5-fpm.sock;
17+
fastcgi_index index.php;
18+
include fastcgi_params;
19+
}
20+
}

docs/nginx/default_reverse_proxy

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
server_tokens off;
2+
3+
server {
4+
listen 80;
5+
server_name phpcurlclass.com;
6+
return 301 http://www.phpcurlclass.com$request_uri;
7+
}
8+
9+
server {
10+
listen 80;
11+
server_name www.phpcurlclass.com;
12+
location / {
13+
proxy_pass http://127.0.0.1:8000/;
14+
proxy_set_header Host $host;
15+
proxy_set_header X-Real-IP $remote_addr;
16+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17+
}
18+
}

0 commit comments

Comments
 (0)