Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nginx.md #1729

Merged
merged 2 commits into from
Dec 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions basics/installation/advanced/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ server {
server_name example.com www.example.com;

# [EDIT] Path to your domain Nginx logs.
access_log /var/log/nginx/example.com-access.log;
error_log /var/log/nginx/example.com-error.log;
access_log /var/log/nginx/example.com-access.log combined;
kpodemski marked this conversation as resolved.
Show resolved Hide resolved
error_log /var/log/nginx/example.com-error.log info;
kpodemski marked this conversation as resolved.
Show resolved Hide resolved

# [EDIT] Path to your SSL certificates (take a look at Certbot https://certbot.eff.org).
ssl_certificate /etc/ssl/fullchain.pem;
Expand All @@ -50,6 +50,19 @@ server {
# WARNING: Don't use this if your site is not fully on HTTPS!
# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" preload; always;

# XSS Protection
# add_header X-XSS-Protection "1; mode=block";

# Clickjacking
# add_header X-Frame-Options "SAMEORIGIN";

# X-Content Type Options
# add_header X-Content-Type-Options nosniff;

# Secure Cookie
# add_header Set-Cookie "Path=/; HttpOnly; Secure";


# [EDIT] If you are using multiple languages.
# rewrite ^/fr$ /fr/ redirect;
# rewrite ^/fr/(.*) /$1;
Expand Down Expand Up @@ -80,11 +93,10 @@ server {

# [EDIT] Replace 'admin-dev' in this block with the name of your admin directory.
location /admin-dev/ {
if (!-e $request_filename) {
rewrite ^ /admin-dev/index.php last;
}
try_files $uri $uri/ /admin-dev/index.php$is_args$args;
}


# .htaccess, .DS_Store, .htpasswd, etc.
location ~ /\. {
deny all;
Expand Down
Loading