Last active
January 30, 2020 03:57
-
-
Save devyfriend/3858dc689bef01f9a720dfc5e8ae9092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 1024; | |
# multi_accept on; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
gzip on; | |
gzip_http_version 1.1; | |
gzip_comp_level 2; | |
gzip_types text/plain text/css application/vnd.ms-excel application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
default_type application/octet-stream; | |
#error_page 500 502 503 504 /50x.html; | |
server { | |
#server_name web.id; | |
listen 80 default_server; | |
listen 443 default_server ssl; | |
server_name xxx.xxx.xxx.xxx; | |
ssl_certificate /etc/nginx/ssl/web.crt; | |
ssl_certificate_key /etc/nginx/ssl/web.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
fastcgi_buffering off; | |
allow all; | |
ssl on; | |
location ~* \.php$ { | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_param X-Real-IP $remote_addr; | |
fastcgi_param X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location ^~ /(images|cache|js|css) { | |
autoindex on; | |
} | |
location / { | |
root /var/www/html/web.id/; | |
try_files $uri /web.id/index.php; | |
index index.php index.html index.htm; | |
access_log /etc/nginx/logs/web.access.log; | |
error_log /etc/nginx/logs/web.error.log; | |
location ~* /(images|cache|js|css) { | |
autoindex on; | |
} | |
location /web/ { | |
try_files $uri /web/index.php; | |
index index.php index.html index.htm; | |
access_log /etc/nginx/logs/web.access.log; | |
error_log /etc/nginx/logs/web.error.log; | |
location ~* \.php$ { | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
include fastcgi_params; | |
fastcgi_param X-Real-IP $remote_addr; | |
fastcgi_param X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
location ~* /(images|cache|js|css) { | |
autoindex on; | |
} | |
} | |
} | |
} | |
# include /etc/nginx/conf.d/*.conf; | |
# include /etc/nginx/sites-enabled/*; | |
} | |
#mail { | |
# # See sample authentication script at: | |
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript | |
# | |
# # auth_http localhost/auth.php; | |
# # pop3_capabilities "TOP" "USER"; | |
# # imap_capabilities "IMAP4rev1" "UIDPLUS"; | |
# | |
# server { | |
# listen localhost:110; | |
# protocol pop3; | |
# proxy on; | |
# } | |
# | |
# server { | |
# listen localhost:143; | |
# protocol imap; | |
# proxy on; | |
# } | |
#} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment