Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #user nginx;
- worker_processes auto;
- pid /var/run/nginx.pid;
- #error_log logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- events {
- worker_connections 10240;
- }
- http {
- include /etc/nginx/mime.types;
- # For user configurations not maintained by DirectAdmin. Empty by default.
- # Supplemental configuration
- default_type application/octet-stream;
- tcp_nopush on;
- tcp_nodelay on;
- sendfile on;
- log_format bytes '$bytes_sent $request_length';
- keepalive_timeout 15;
- types_hash_max_size 2048;
- disable_symlinks if_not_owner from=$document_root;
- server_tokens off;
- client_max_body_size 1024m;
- client_body_buffer_size 128k;
- server_names_hash_bucket_size 128;
- server_names_hash_max_size 10240;
- ssl_dhparam /etc/nginx/ssl.crt/dhparams.pem;
- ssl_session_cache shared:SSL:10m;
- ssl_session_timeout 5m;
- proxy_read_timeout 1800s;
- # https://mozilla.github.io/server-side-tls/ssl-config-generator/ intermediate configuration.
- ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
- ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
- ssl_prefer_server_ciphers on;
- index index.html index.htm index.php;
- gzip on;
- gzip_static on;
- gzip_disable "msie6";
- gzip_http_version 1.1;
- gzip_vary on;
- gzip_comp_level 1;
- gzip_proxied any;
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/svg+xml;
- gzip_buffers 16 8k;
- server {
- listen 172.72.133.10:80;
- listen 127.0.0.1:80;
- #listen [::1]:80;
- server_name $hostname 172.72.133.10;
- root /var/www/html;
- include /etc/nginx/nginx-userdir.conf;
- # Pass all .php files onto a php-fpm/php-fcgi server.
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/usr/local/php73/sockets/webapps.sock;
- }
- location /nginx_status {
- # Enable nginx status page
- stub_status on;
- # Disable status page logging in access_log
- access_log off;
- # Allow access from 127.0.0.1
- allow 127.0.0.1;
- # Deny all the other connections
- deny all;
- }
- location ^~ /.well-known/acme-challenge {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/.well-known/acme-challenge/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/.well-known/acme-challenge/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /roundcube {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/roundcube/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /phpMyAdmin {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/phpMyAdmin/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ~ ^/phpmyadmin {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ ^/pma {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ /(\.htaccess|\.htpasswd|\.user\.ini|\.env|\.git) {
- deny all;
- }
- location ~ /roundcube/(bin|SQL|config|logs|temp)/ {
- deny all;
- }
- location ~ /phpMyAdmin/log/ {
- deny all;
- }
- }
- # HTTPS server
- #
- server {
- listen 172.72.133.10:443 ssl;
- listen 127.0.0.1:443 ssl;
- #listen [::1]:443 ssl;
- server_name $hostname 172.72.133.10;
- ssl_certificate /etc/nginx/ssl.crt/server.crt.combined;
- ssl_certificate_key /etc/nginx/ssl.key/server.key;
- root /var/www/html;
- #Support UserDir (~/user/)
- location ~^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ {
- alias /home/$userdir_user/public_html$userdir_uri;
- autoindex on;
- location ~ \.php$ {
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- #try_files does not work after alias directive
- if (!-f $request_filename) {
- return 404;
- }
- fastcgi_param DOCUMENT_ROOT /home/$userdir_user/public_html;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_pass unix:/usr/local/php73/sockets/$userdir_user.sock;
- }
- }
- # Pass all .php files onto a php-fpm/php-fcgi server.
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/usr/local/php73/sockets/webapps.sock;
- }
- location /nginx_status {
- # Enable nginx status page
- stub_status on;
- # Disable status page logging in access_log
- access_log off;
- # Allow access from 127.0.0.1
- allow 127.0.0.1;
- # Deny all the other connections
- deny all;
- }
- location ^~ /.well-known/acme-challenge {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/.well-known/acme-challenge/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/.well-known/acme-challenge/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /roundcube {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/roundcube/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /phpMyAdmin {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/phpMyAdmin/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ~ ^/phpmyadmin {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ ^/pma {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ /(\.htaccess|\.htpasswd|\.user\.ini|\.env|\.git) {
- deny all;
- }
- location ~ /roundcube/(bin|SQL|config|logs|temp)/ {
- deny all;
- }
- location ~ /phpMyAdmin/log/ {
- deny all;
- }
- }
- server
- {
- listen 172.72.133.10:80;
- server_name buro247.my www.buro247.my ;
- access_log /var/log/nginx/domains/buro247.my.log;
- access_log /var/log/nginx/domains/buro247.my.bytes bytes;
- error_log /var/log/nginx/domains/buro247.my.error.log;
- root /home/buromy/domains/buro247.my/public_html;
- index index.php index.html index.htm;
- # use fastcgi for all php files
- location ~ \.php$
- {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/nginx_limits.conf;
- if (-f $request_filename)
- {
- fastcgi_pass unix:/usr/local/php73/sockets/buromy.sock;
- }
- }
- location ^~ /.well-known/acme-challenge {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/.well-known/acme-challenge/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/.well-known/acme-challenge/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /roundcube {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/roundcube/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /phpMyAdmin {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/phpMyAdmin/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ~ ^/phpmyadmin {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ ^/pma {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ /(\.htaccess|\.htpasswd|\.user\.ini|\.env|\.git) {
- deny all;
- }
- location ~ /roundcube/(bin|SQL|config|logs|temp)/ {
- deny all;
- }
- location ~ /phpMyAdmin/log/ {
- deny all;
- }
- }
- server
- {
- listen 172.72.133.10:443 ssl http2;
- server_name buro247.my www.buro247.my ;
- access_log /var/log/nginx/domains/buro247.my.log;
- access_log /var/log/nginx/domains/buro247.my.bytes bytes;
- error_log /var/log/nginx/domains/buro247.my.error.log;
- root /home/buromy/domains/buro247.my/private_html;
- index index.php index.html index.htm;
- ssl_certificate /etc/nginx/ssl.crt/server.crt.combined;
- ssl_certificate_key /etc/nginx/ssl.key/server.key;
- # use fastcgi for all php files
- location ~ \.php$
- {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /etc/nginx/nginx_limits.conf;
- if (-f $request_filename)
- {
- fastcgi_pass unix:/usr/local/php73/sockets/buromy.sock;
- }
- }
- location ^~ /.well-known/acme-challenge {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/.well-known/acme-challenge/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/.well-known/acme-challenge/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /roundcube {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/roundcube/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ^~ /phpMyAdmin {
- root /var/www/html/;
- index index.php index.html index.htm;
- location ~ ^/phpMyAdmin/(.+\.php)$ {
- include /etc/nginx/webapps_settings.conf;
- }
- location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|webp|xml|txt))$ {
- root /var/www/html/;
- }
- }
- location ~ ^/phpmyadmin {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ ^/pma {
- rewrite ^/* /phpMyAdmin last;
- }
- location ~ /(\.htaccess|\.htpasswd|\.user\.ini|\.env|\.git) {
- deny all;
- }
- location ~ /roundcube/(bin|SQL|config|logs|temp)/ {
- deny all;
- }
- location ~ /phpMyAdmin/log/ {
- deny all;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement