123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- server {
- listen 80;
- listen [::]:80;
- server_name $HOST_DHCP;
- return 301 https://$HOST_DHCP${DOLAR}request_uri;
- }
- map ${DOLAR}http_upgrade ${DOLAR}connection_upgrade {
- default upgrade;
- '' close;
- }
- server {
- listen 443 ssl;
- listen [::]:443;
- server_name $HOST_DHCP;
- ssl_certificate /etc/nginx/certs/fullchain.pem;
- ssl_certificate_key /etc/nginx/certs/privkey.pem;
- root /opt/dhcp/web;
- location /bundles/ {
- root /opt/dhcp/web;
- }
- location / {
- try_files ${DOLAR}uri /app.php${DOLAR}is_args${DOLAR}args;
- }
- #
- location ~ ^/(app_dev|config)\.php(/|$) {
- fastcgi_pass unix:/tmp/dhcp/dhcp.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME ${DOLAR}realpath_root${DOLAR}fastcgi_script_name;
- fastcgi_param DOCUMENT_ROOT ${DOLAR}realpath_root;
- fastcgi_ignore_client_abort on;
- fastcgi_param REMOTE_ADDR ${DOLAR}http_x_real_ip;
- }
- # PROD
- location ~ ^/app\.php(/|$) {
- fastcgi_pass unix:/tmp/dhcp/dhcp.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME ${DOLAR}realpath_root${DOLAR}fastcgi_script_name;
- fastcgi_param DOCUMENT_ROOT ${DOLAR}realpath_root;
- fastcgi_ignore_client_abort on;
- fastcgi_param REMOTE_ADDR ${DOLAR}http_x_real_ip;
- internal;
- }
- location ~ \.php$ {
- return 404;
- }
-
- location /ws {
- proxy_pass http://amqp:15674/ws;
- proxy_http_version 1.1;
- proxy_set_header Upgrade ${DOLAR}http_upgrade;
- proxy_set_header Connection ${DOLAR}connection_upgrade;
- }
- }
|