From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 9 Jan 2020 10:55:03 +0100 Subject: phpmyadmin working --- srcs/nginx_conf/test.com | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 srcs/nginx_conf/test.com (limited to 'srcs/nginx_conf') diff --git a/srcs/nginx_conf/test.com b/srcs/nginx_conf/test.com new file mode 100644 index 0000000..b9d9de2 --- /dev/null +++ b/srcs/nginx_conf/test.com @@ -0,0 +1,30 @@ +server { + listen 80; + 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 + } +} + -- cgit