68 lines
1.9 KiB
Nginx Configuration File
68 lines
1.9 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name ${DOMAIN_NAME};
|
|
|
|
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
|
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
|
|
|
root /var/www/html;
|
|
|
|
access_log /var/log/nginx/example.localhost-access.log;
|
|
error_log /var/log/nginx/example.localhost-error.log error;
|
|
index index.html index.htm index.php;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
|
}
|
|
|
|
location ~ /adminer\.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass adminer:9000;
|
|
fastcgi_index adminer.php;
|
|
include fastcgi.conf;
|
|
}
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass wordpress:9000;
|
|
fastcgi_index index.php;
|
|
include fastcgi.conf;
|
|
}
|
|
|
|
}
|
|
|
|
server {
|
|
listen 8443 ssl;
|
|
server_name ${DOMAIN_NAME};
|
|
|
|
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
|
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
|
|
|
location / {
|
|
proxy_pass http://mailhog:8025;
|
|
chunked_transfer_encoding on;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-NginX-Proxy true;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_http_version 1.1;
|
|
proxy_redirect off;
|
|
proxy_buffering off;
|
|
}
|
|
}
|
|
|
|
|
|
} |