blob: b04e470a1b4892bf15152265b2a31b820eeda72c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /root/ssl/localhost.pem;
ssl_certificate_key /root/ssl/localhost-key.pem;
server_name localhost;
index index.php;
root /var/www/wordpress;
location / {
try_files $uri $uri/ =404; # if uri or uri/ not valid, 404 error
}
# phpmyadmin path, change root
location /phpmyadmin {
root /var/www;
index index.php;
location ~ ^/phpmyadmin/(.+\.php)$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
location ~ ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /var/www;
}
}
# php files
location ~ \.php$ {
include snippets/fastcgi-php.conf; # include php fpm settings
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; # socket where php fpm is running
}
}
server {
listen 80;
listen [::]:80;
server_name localhost;
return 301 https://$host$request_uri;
}
|