-
Notifications
You must be signed in to change notification settings - Fork 848
/
default.conf
126 lines (112 loc) · 4.77 KB
/
default.conf
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Default local nginx (web server) configurations
#
# Configurations are provided for 3 default sites in this file:
#
# http://{vvv_ipaddress}
# - Standard handling for php files, no WordPress
# - Files available locally in this repository's www/default
# - Files available on guest (vagrant ssh) in /srv/www/default
# http://local.wordpress.dev
# - Latest stable version of WordPress
# - Files available locally in this repository's www/wordpress-default
# - Files available on guest (vagrant ssh) in /srv/www/wordpress-default
# http://local.wordpress-trunk.dev
# - SVN repository of WordPress trunk
# - Files available locally in this repository's www/wordpress-trunk
# - Files available on guest (vagrant ssh) in /srv/www/wordpress-trunk
#
################################################################
# Default nginx catch-all server
#
# This server configuration provides a catch all for any domains that point to
# this IP address but are not specified through a server configuration. Files
# placed in the /srv/www/default directory are accessible through this IP. It is
# not intended to run WordPress through this directory.
server {
listen 80 default_server;
listen 443 ssl;
root /srv/www/default;
server_name vvv.dev;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}
gzip off;
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}
# this prevents hidden files (beginning with a period) from being served
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ \.php$ {
client_max_body_size 25M;
try_files $uri =404;
# Include the fastcgi_params defaults provided by nginx
include /etc/nginx/fastcgi_params;
# SCRIPT_FILENAME is a required parameter for things to work properly,
# but is missing in the default fastcgi_params. We define it here to
# be sure that it exists.
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# Use the upstream for fastcgi / php5-fpm that we defined in nginx.conf
fastcgi_pass php;
# And get to serving the file!
fastcgi_index index.php;
}
}
################################################################
# WordPress stable nginx configuration
#
# http://local.wordpress.dev - this server configuration is
# setup to listen on port 80 for any requests coming in to
# local.wordpress.dev and use the /srv/www/wordpress-default directory
# to serve them.
server {
listen 80;
listen 443 ssl;
server_name local.wordpress.dev *.local.wordpress.dev ~^local\.wordpress\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/wordpress-default;
include /etc/nginx/nginx-wp-common.conf;
}
################################################################
# WordPress trunk nginx configuration
#
# http://local.wordpress-trunk.dev - this server configuration is
# setup to listen on port 80 for any requests coming in to
# local.wordpress-trunk.dev and use the /srv/www/wordpress-trunk
# directory to serve them.
server {
listen 80;
listen 443 ssl;
server_name local.wordpress-trunk.dev *.local.wordpress-trunk.dev ~^local\.wordpress-trunk\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/wordpress-trunk;
include /etc/nginx/nginx-wp-common.conf;
}
################################################################
# WordPress develop src nginx configuration
#
# http://src.wordpress-develop.dev - this server configuration is
# setup to listen on port 80 for any requests coming in to
# src.wordpress-develop.dev and use the /srv/www/wordpress-develop/src
# directory to serve them.
server {
listen 80;
listen 443 ssl;
server_name src.wordpress-develop.dev *.src.wordpress-develop.dev ~^src\.wordpress-develop\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/wordpress-develop/src;
include /etc/nginx/nginx-wp-common.conf;
}
################################################################
# WordPress develop build nginx configuration
#
# http://build.wordpress-develop.dev - this server configuration is
# setup to listen on port 80 for any requests coming in to
# build.wordpress-develop.dev and use the /srv/www/wordpress-develop/build
# directory to serve them.
server {
listen 80;
listen 443 ssl;
server_name build.wordpress-develop.dev *.build.wordpress-develop.dev ~^build\.wordpress-develop\.\d+\.\d+\.\d+\.\d+\.xip\.io$;
root /srv/www/wordpress-develop/build;
include /etc/nginx/nginx-wp-common.conf;
}