Merge pull request #3050 from lilashih/master
laravel octane nginx configuration added
This commit is contained in:
commit
8184e801d8
@ -193,6 +193,7 @@ services:
|
|||||||
- DOCKER_TLS_VERIFY=1
|
- DOCKER_TLS_VERIFY=1
|
||||||
- DOCKER_TLS_CERTDIR=/certs
|
- DOCKER_TLS_CERTDIR=/certs
|
||||||
- DOCKER_CERT_PATH=/certs/client
|
- DOCKER_CERT_PATH=/certs/client
|
||||||
|
- CHOKIDAR_USEPOLLING=true
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- frontend
|
||||||
- backend
|
- backend
|
||||||
|
56
nginx/sites/octane.conf.example
Normal file
56
nginx/sites/octane.conf.example
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream octane {
|
||||||
|
server workspace:8000 weight=5 max_fails=3 fail_timeout=30s;
|
||||||
|
keepalive 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name octane.test;
|
||||||
|
server_tokens off;
|
||||||
|
root /var/www/octane/public;
|
||||||
|
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location /index.php {
|
||||||
|
try_files /not_exists @octane;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ @octane;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
|
location = /robots.txt { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
error_page 404 /index.php;
|
||||||
|
|
||||||
|
location @octane {
|
||||||
|
set $suffix "";
|
||||||
|
|
||||||
|
if ($uri = /index.php) {
|
||||||
|
set $suffix ?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header Scheme $scheme;
|
||||||
|
proxy_set_header SERVER_PORT $server_port;
|
||||||
|
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
|
||||||
|
proxy_pass http://octane$suffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_log /var/log/nginx/octane_error.log;
|
||||||
|
access_log /var/log/nginx/octane_access.log;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user