Created
June 17, 2022 13:25
-
-
Save troke12/7a438af18aa3e4bdc1108cb8cb38a1bc 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
server { | |
listen 80; | |
listen [::]:80; | |
server_name namadomainkamu.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name namadomainkamu.com; | |
root /var/www/myProject; | |
index index.php index.html; | |
#Certificate pathes | |
ssl_certificate /root/cf/main.pem; | |
ssl_certificate_key /root/cf/main-key.pem; | |
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; | |
ssl_protocols TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; | |
} | |
location / { | |
autoindex on; | |
index index.php; | |
rewrite ^/(u|d)/[0-9]+$ /rewrite.php; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment