Welcome! Log In Create A New Profile

Advanced

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

October 07, 2016 10:20AM
Hello Francis,

Thankyou for your reply.

I have seperate config files for each website in /etc/nginx/sites-enabled and have removed the default file

I have this directive in /etc/nginx/nginx.conf

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

server {
listen 80 default_server;
server_name _;
return 444;
}

This is the start of my server block for website2 that i do want phpmyadmin access for

server {
server_name website.com www.website.com;

and the only phpmyadmin directive is for a pre-auth login box before the phpam login page displays

location /phpmyadmin {
auth_basic "Admin Login";
auth_basic_user_file /etc/nginx/allow_phpmyadmin;
}

If i remove the /phpmyadmin section from website1 config file, it just removes the pre-auth login box and goes straight to the main phpma screen.

I have a symlink for nginx to use phpmyadmin /usr/share/phpmyadmin /usr/share/nginx/html

I have a symlink in website2 and 4 directory's for /usr/share/phpmyadmin

i dont have any symlinks in websites 1 and 3 directory's for /usr/share/phpmyadmin - but yet these websites are still server /phpmyadmin

Im not sure what i need to remove after reading your reply - Shall i remove the server_name line from the nginx.conf file?

Thankyou
Subject Author Posted

Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

mrast October 06, 2016 06:07PM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

Francis Daly October 07, 2016 09:34AM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

mrast October 07, 2016 10:20AM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

Francis Daly October 09, 2016 11:50AM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

mrast October 09, 2016 12:50PM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

Francis Daly October 09, 2016 03:42PM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

mrast October 10, 2016 04:29AM

Re: Allow PHPMyAdmin access on certain virtual hosts - Ubuntu and Nginx

Francis Daly October 10, 2016 12:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready