-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_meme
60 lines (33 loc) · 1.21 KB
/
nginx_meme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Basic Default 80
# more examples https://www.nginx.com/resources/wiki/start/topics/examples/full/
error_page 404 = @wordpress;
log_not_found off;
#https://gist.github.com/c3mdigital/2765663 below @ line 37
server {
#listen 80; listens to h. listen [::] 80 is IPv6;
listen 80;
listen [::]:80;
server_name tta.pw meme.sh;
#return 301 https://$host$request_uri;
root /var/www/meme.sh/;
index index.html index.htm index.php;
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
}
# Reference -> https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-16-04
# Afterwards you move the location blocks into 443 , once the SSL cert is ready
# Basic Default 443