Skip to content

Commit 9c0bf82

Browse files
committed
Clear default.conf and restore default.template.conf to its original state
1 parent 902c360 commit 9c0bf82

File tree

2 files changed

+14
-118
lines changed

2 files changed

+14
-118
lines changed

etc/nginx/default.conf

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +0,0 @@
1-
# Nginx configuration
2-
3-
# HTTP Server
4-
server {
5-
listen 80 default_server;
6-
listen [::]:80 default_server;
7-
server_name localhost;
8-
9-
# Logging
10-
access_log /var/log/nginx/access.log;
11-
error_log /var/log/nginx/error.log;
12-
13-
# Root directory and index files
14-
root /var/www/html/app/public;
15-
index index.php index.html;
16-
17-
# Framework specific configuration
18-
include /etc/nginx/conf.d/framework/default.conf;
19-
20-
# PHP-FPM Configuration
21-
location ~ \.php$ {
22-
try_files $uri =404;
23-
fastcgi_split_path_info ^(.+\.php)(/.+)$;
24-
fastcgi_pass php:9000;
25-
fastcgi_index index.php;
26-
include fastcgi_params;
27-
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
28-
fastcgi_param PATH_INFO $fastcgi_path_info;
29-
}
30-
31-
# Deny access to hidden files
32-
location ~ /\. {
33-
deny all;
34-
}
35-
36-
# Deny access to specific directories
37-
location ~ ^/(vendor|tests|src|app)/ {
38-
deny all;
39-
return 404;
40-
}
41-
42-
# Optimize static file serving
43-
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
44-
expires 30d;
45-
add_header Cache-Control "public, no-transform";
46-
}
47-
}
48-
49-
# HTTPS Server (uncomment to enable SSL)
50-
# server {
51-
# listen 443 ssl http2;
52-
# listen [::]:443 ssl http2;
53-
# server_name localhost;
54-
#
55-
# # SSL Configuration
56-
# ssl_certificate /etc/ssl/server.crt;
57-
# ssl_certificate_key /etc/ssl/server.key;
58-
#
59-
# # Modern SSL settings
60-
# ssl_protocols TLSv1.2 TLSv1.3;
61-
# ssl_prefer_server_ciphers on;
62-
# ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
63-
# ssl_session_cache shared:SSL:10m;
64-
# ssl_session_timeout 1d;
65-
# ssl_session_tickets off;
66-
#
67-
# # Root directory and index files
68-
# root /var/www/html/app/public;
69-
# index index.php index.html;
70-
#
71-
# # Logging
72-
# access_log /var/log/nginx/access.log;
73-
# error_log /var/log/nginx/error.log;
74-
#
75-
# # Framework specific configuration
76-
# include /etc/nginx/framework/default.conf;
77-
#
78-
# # PHP-FPM Configuration
79-
# location ~ \.php$ {
80-
# try_files $uri =404;
81-
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
82-
# fastcgi_pass php:9000;
83-
# fastcgi_index index.php;
84-
# include fastcgi_params;
85-
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
86-
# fastcgi_param PATH_INFO $fastcgi_path_info;
87-
# fastcgi_param HTTPS on;
88-
# }
89-
#
90-
# # Deny access to hidden files
91-
# location ~ /\. {
92-
# deny all;
93-
# }
94-
#
95-
# # Deny access to specific directories
96-
# location ~ ^/(vendor|tests|src|app)/ {
97-
# deny all;
98-
# return 404;
99-
# }
100-
#
101-
# # Optimize static file serving
102-
# location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
103-
# expires 30d;
104-
# add_header Cache-Control "public, no-transform";
105-
# }
106-
# }

etc/nginx/default.template.conf

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,33 +48,35 @@ server {
4848

4949
# HTTPS Server (uncomment to enable SSL)
5050
# server {
51-
# listen 443 ssl http2;
52-
# listen [::]:443 ssl http2;
51+
# listen 443 ssl;
52+
# listen [::]:443 ssl;
53+
# http2 on;
54+
#
5355
# server_name ${NGINX_HOST};
54-
#
56+
#
5557
# # SSL Configuration
5658
# ssl_certificate /etc/ssl/server.crt;
5759
# ssl_certificate_key /etc/ssl/server.key;
58-
#
60+
#
5961
# # Modern SSL settings
6062
# ssl_protocols TLSv1.2 TLSv1.3;
6163
# ssl_prefer_server_ciphers on;
6264
# ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
6365
# ssl_session_cache shared:SSL:10m;
6466
# ssl_session_timeout 1d;
6567
# ssl_session_tickets off;
66-
#
68+
#
6769
# # Root directory and index files
6870
# root /var/www/html/${APP_PUBLIC_DIR};
6971
# index index.php index.html;
70-
#
72+
#
7173
# # Logging
7274
# access_log /var/log/nginx/access.log;
7375
# error_log /var/log/nginx/error.log;
74-
#
76+
#
7577
# # Framework specific configuration
76-
# include /etc/nginx/framework/${APP_FRAMEWORK}.conf;
77-
#
78+
# include /etc/nginx/conf.d/framework/${APP_FRAMEWORK}.conf;
79+
#
7880
# # PHP-FPM Configuration
7981
# location ~ \.php$ {
8082
# try_files $uri =404;
@@ -86,18 +88,18 @@ server {
8688
# fastcgi_param PATH_INFO $fastcgi_path_info;
8789
# fastcgi_param HTTPS on;
8890
# }
89-
#
91+
#
9092
# # Deny access to hidden files
9193
# location ~ /\. {
9294
# deny all;
9395
# }
94-
#
96+
#
9597
# # Deny access to specific directories
9698
# location ~ ^/(vendor|tests|src|app)/ {
9799
# deny all;
98100
# return 404;
99101
# }
100-
#
102+
#
101103
# # Optimize static file serving
102104
# location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
103105
# expires 30d;

0 commit comments

Comments
 (0)