mirror of
https://github.com/openvk/chandler.git
synced 2024-11-15 11:39:09 +03:00
50 lines
1.2 KiB
Nginx Configuration File
50 lines
1.2 KiB
Nginx Configuration File
|
# nginx.conf file for chandler
|
||
|
#
|
||
|
# this is a example configuration file. adapt the config
|
||
|
# values to your own needs.
|
||
|
#
|
||
|
# the use of tls (e.g., let's encrypt) is recommended.
|
||
|
#
|
||
|
# to install, rename the file name, put it in
|
||
|
# /etc/nginx/sites-available and make a symlink to
|
||
|
# /etc/nginx/sites-enabled
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
server_name domain.tld;
|
||
|
|
||
|
root /opt/chandler/htdocs;
|
||
|
|
||
|
ssl_certificate /path/to/fullchain.pem;
|
||
|
ssl_certificate_key /path/to/privkey.pem;
|
||
|
|
||
|
location / {
|
||
|
index index.php;
|
||
|
try_files $uri $uri/ /index.php;
|
||
|
}
|
||
|
|
||
|
# DO NOT DELETE "(?!well-known).*" if you want to use let's encrypt.
|
||
|
location ~ /\.(?!well-known).* {
|
||
|
deny all;
|
||
|
access_log off;
|
||
|
log_not_found off;
|
||
|
}
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
# include fastcgi.conf;
|
||
|
include fastcgi_params;
|
||
|
# choose one of the above depending on your distribution.
|
||
|
|
||
|
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
|
||
|
# when using a TCP socket, use the following:
|
||
|
# fastcgi_pass 127.0.0.1:9000;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
server_name domain.tld;
|
||
|
return 301 https://$server_name$request_uri;
|
||
|
}
|