-
-
Save elkebirmed/108ddd89d9e7de1babab8c91cdebea21 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
server { | |
listen 80; | |
listen [::]:80; | |
server_name server.douaoui.com; | |
root /var/www/roundcube/; | |
index index.php index.html index.htm; | |
error_log /var/log/nginx/roundcube.error; | |
access_log /var/log/nginx/roundcube.access; | |
location / { | |
try_files $uri $uri/ /index.php; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/run/php/php7.4-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location ~ /.well-known/acme-challenge { | |
allow all; | |
} | |
location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ { | |
deny all; | |
} | |
location ~ ^/(bin|SQL)/ { | |
deny all; | |
} | |
# A long browser cache lifetime can speed up repeat visits to your page | |
location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ { | |
access_log off; | |
log_not_found off; | |
expires 360d; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment