File: //etc/nginx/sites-enabled/event.res.in-ssl
server {
listen 80;
server_name event.csmcri.res.in;
return 301 https://event.csmcri.res.in$request_uri;
}
server {
listen 443 ssl http2;
server_name event.csmcri.res.in;
root /srv/www/event-csmcri; ## <-- Your only path reference.
## This should be in your http block and if it is, it's not needed here.
index index.php;
access_log /var/log/nginx/event-res-in_access.log;
error_log /var/log/nginx/event-res-in_error.log;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't break when using query string
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
ssl_certificate /etc/ssl/nginx/mailin_csmcri_org.crt;
ssl_certificate_key /etc/ssl/nginx/mailin_csmcri_org.key;
ssl_session_timeout 15m;
}