Created
May 24, 2023 09:56
-
-
Save djamol/46a2502cdc1d77271aa0dbfa0bdcd142 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 freeswitch daemon; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
error_log /var/log/nginx/nginx_error.log crit; | |
include /etc/nginx/modules-enabled/*.conf; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
log_format default '\$remote_addr - \$remote_user [\$time_local] "\$request" ' | |
'\$status \$body_bytes_sent "\$http_referer" ' | |
'"\$http_user_agent" \$http_x_forwarded_for'; | |
log_format my_tracking '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'Ref:"$http_referer" Agent:"$http_user_agent" ' | |
'proxy_upstream_name=$upstream_addr ' | |
'response_time=$upstream_response_time ' | |
'request_time=$request_time'; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
# server_tokens off; | |
# server_names_hash_bucket_size 64; | |
# server_name_in_redirect off; | |
# Gzip Settings | |
gzip on; | |
gzip_disable "msie6"; | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
server { | |
listen 443 ssl; | |
server_name amol.intalk.io; | |
root /var/www/html/openpbx; | |
ssl_certificate /etc/ssl/certs/opencc.crt; | |
ssl_certificate_key /etc/ssl/certs/opencc.key; | |
ssl_protocols TLSv1.2 TLSv1.3; | |
ssl_verify_client off; | |
index index.html index.htm index.php; | |
error_log /var/log/nginx/$time_iso8601-ssl_error.log; | |
access_log /var/log/nginx/$time_iso8601-ssl_access.log; | |
location ~ ^/(public|cc)/(home|login|api) { | |
proxy_pass https://amol.demo.io:4438; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Cookie $http_cookie; | |
proxy_cookie_path / "/; Secure"; | |
access_log /var/log/nginx/proxy.log.$time_local my_tracking; | |
} | |
location ~ [^/]\.php(/|$) { | |
proxy_pass https://amol.demo.io:4438; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header Cookie $http_cookie; | |
proxy_cookie_path / "/; Secure"; | |
access_log /var/log/nginx/proxy.log.$time_local my_tracking; | |
} | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires max; | |
log_not_found on; | |
} | |
# disable access to all dot files and folders (nginx specific) | |
location ~ /\. { | |
deny all; | |
access_log off; | |
log_not_found off; | |
} | |
} | |
} | |
#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