nginx samples sites for multiple projects
- add `project-1.conf` and `project-1.conf` to match the docs. - keep default to work with both multiple and single projects. - delete the .gitignore. - update docker-compose and example-env file to match the new settings - update the docs - delete `laravel-https.conf` to replace it with documentation instead
This commit is contained in:
2
nginx/sites/.gitignore
vendored
2
nginx/sites/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*.conf
|
||||
!default.conf
|
@ -3,7 +3,7 @@ server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
server_name laradock;
|
||||
server_name locahost;
|
||||
root /var/www/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
|
@ -3,8 +3,8 @@ server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name sample.dev;
|
||||
root /var/www/sample/public;
|
||||
server_name project-1.dev;
|
||||
root /var/www/project-1/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
@ -15,6 +15,8 @@ server {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
@ -22,6 +24,11 @@ server {
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt/;
|
||||
log_not_found off;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,10 @@
|
||||
server {
|
||||
|
||||
listen 443 default_server;
|
||||
listen [::]:443 default_server ipv6only=on;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
#ssl on;
|
||||
#ssl_certificate /var/certs/cert1.pem;
|
||||
#ssl_certificate_key /var/certs/privkey1.pem;
|
||||
|
||||
server_name laravel;
|
||||
root /var/www/laravel/public;
|
||||
server_name project-2.dev;
|
||||
root /var/www/project-2/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location / {
|
||||
@ -19,6 +15,8 @@ server {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass php-upstream;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
@ -27,4 +25,11 @@ server {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/letsencrypt/;
|
||||
log_not_found off;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user