added nginx-phpmyadmin.conf

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-06 10:51:11 +02:00
parent e1a7b811e2
commit 8f21321eaf
4 changed files with 81 additions and 15 deletions

View File

@@ -106,8 +106,8 @@ server {
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
try_files $uri @rewrite;
expires max;
log_not_found off;
try_files $uri @rewrite;
expires max;
log_not_found off;
}
}

View File

@@ -0,0 +1,33 @@
server {
listen 80;
location /phpmyadmin {
# server_name phpmyadmin.idroot.net;
root /usr/share/phpmyadmin;
location / {
index index.php;
}
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
}
location ~ /\.ht {
deny all;
}
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
return 404;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
}

View File

@@ -1,10 +1,10 @@
server {
listen 80;
server_name yourdomain.ltd;
root /var/www/yourdomain.ltd/public_html;
index index.html index.php;
server_name yourdomain.ltd;
charset utf-8;
location / {