diff options
| author | _Tradam <[email protected]> | 2025-09-09 16:18:52 +0900 |
|---|---|---|
| committer | _Tradam <[email protected]> | 2025-09-09 16:18:52 +0900 |
| commit | a206493f3b3460e21353cea5477eebbcc10c0301 (patch) | |
| tree | 4c1e9afefded5e1c8524da82f83bdc447858dd9f /nginx | |
| download | wordpress-docker-a206493f3b3460e21353cea5477eebbcc10c0301.tar.gz wordpress-docker-a206493f3b3460e21353cea5477eebbcc10c0301.zip | |
init
Diffstat (limited to 'nginx')
| -rwxr-xr-x | nginx/default.conf | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100755 index 0000000..dd7534a --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,41 @@ +upstream php { + # Remove the unix socket line - it won't work between containers + server php:9000; +} + +server { + listen 80; + server_name 100.75.105.112; + root /var/www/html; + index index.php index.html; # Add this line + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + include fastcgi.conf; + fastcgi_intercept_errors on; + fastcgi_pass php; + } +} + +server { + listen 443 ssl; + server_name ${NGINX_SERVER_NAME}; + root /var/www/html; + index index.php index.html; # Add this line + + location / { + try_files $uri $uri/ /index.php?$args; + } + + location ~ \.php$ { + include fastcgi.conf; + fastcgi_intercept_errors on; + fastcgi_pass php; + } + + ssl_certificate /etc/nginx/certs/self-signed/cert.pem; + ssl_certificate_key /etc/nginx/certs/self-signed/cert-key.pem; +} |
