server {
listen 80;
server_name swight.live www.swight.live;
location / {
return 301 https://swight.live$request_uri;
}
location ~ /vkbot/ {
root /home/www/vkbot/;
try_files $uri $uri/ /index.php?$args;
index index.php index.html;
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~* \.(js|css|swf|ico|png|jpg|gif|jpeg|woff|woff2)$ {
add_header Cache-Control public;
expires 7d;
}
}
}
server {
listen 443 ssl;
server_name swight.live www.swight.live;
ssl_certificate /home/www/.crt/swight.live/certificate.crt;
ssl_certificate_key /home/www/.crt/swight.live/private.key;
location / {
root /home/www/swight.live;
try_files $uri $uri/ /index.php?$args;
index index.php index.html;
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~* \.(js|css|swf|ico|png|jpg|gif|jpeg|woff|woff2)$ {
add_header Cache-Control public;
expires 7d;
}
}
}
listen 80;
server_name www.swight.live swight.live;
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running)
listen 80;
server_name www.swight.live swight.live;
tcp 0 0 168.61.217.148:80 0.0.0.0:* LISTEN
eth0: flags=4163 mtu 1500
inet 10.0.0.4 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::20d:3aff:fe94:3ef0 prefixlen 64 scopeid 0x20
ether 00:0d:3a:94:3e:f0 txqueuelen 1000 (Ethernet)
RX packets 5386843 bytes 3137292371 (3.1 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5469700 bytes 985497860 (985.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 335162 bytes 40128116 (40.1 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 335162 bytes 40128116 (40.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0