Contact SalesSitemapCustomer Login

Go Back   VPSlink Forums > Operating Systems > Fedora

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2010, 06:48 PM
Junior Member
 
Join Date: Apr 2009
Posts: 11
Default phpMyAdmin

Hello,

I am currently setting up a Fedora 11 server and have most things installed and ready to go, but I am stuck on getting phpmyadmin to work.

I have done it before so the config is not a problem for me. I'll try to explain the best I can.

In httpd.conf the default Document root is set to "/var/www/html" but I have VirtualHost's set up.

Code:
<VirtualHost *:80>
    ServerAdmin myemail
    DocumentRoot /home/username/www/html/mainwebsite
    ServerName website #1
    ServerAlias website#1.com www.website#1.com
    ScriptAlias /cgi-bin/ /home/username/www/html/mainwebsite/cgi-bin/
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin myemail
    DocumentRoot /home/username/www/html/subdomain#1
    ServerName subdomain#1
    ServerAlias subdomain#1.website#1.com www.subdomain#1.website#1.com
    ScriptAlias /cgi-bin/ /home/username/www/html/subdomain#1/cgi-bin/
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin myemail
    DocumentRoot /home/username/www/html/subdomain#2
    ServerName subdomain#2
    ServerAlias subdomain#2.website#1.com www.subdomain#2.website#1.com
    ScriptAlias /cgi-bin/ /home/username/www/html/subdomain#2/cgi-bin/
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>

<VirtualHost SecondIPaddress:80>
    ServerAdmin myemail
    DocumentRoot /home/username/www/html/mainwebsite
    ServerName website #2
    ServerAlias website#2.com www.website#2.com
    ScriptAlias /cgi-bin/ /home/username/www/html/website#2/cgi-bin/
    ErrorLog logs/error_log
    CustomLog logs/access_log common
</VirtualHost>
So when I put the phpmyadmin folder in /home/user/www/html I would get either a 404 or could not access the server.

I tried changing the virtualHosts to /home/username/www/html/ and it worked then, but then the actual sites didn't work correctly either. I also tried to just put it in /var/www/html, the root diretory and nothing.

If anyone has any idea's or solutions, I would appreciate it.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 01-27-2010, 10:33 PM
Senior Member
 
Join Date: Jul 2007
Location: 127.0.0.1
Posts: 391
Default

Not sure how this works for Apache, but with Lighttpd, I had to setup an "alias" for the virt-domains.. For example:

Code:
$SERVER["socket"] == "67.223.255.255:9925" {

	ssl.engine = "enable"
	ssl.pemfile = "/etc/lighttpd/ssl/virt-host.tld/server.pem"

	$HTTP["host"] =~ "virt-host.tld" {

		$HTTP["remoteip"] !~ "68.95|127.0.0" {
			url.access-deny = ( "" ) 
		}

		var.servername = "virt-host.tld"
		server.document-root = "/var/www/" + servername
		accesslog.filename = "/var/log/httpd/" + servername + "-access.log"

		alias.url = (
			"/phpmyadmin" => "/usr/share/phpmyadmin",
			"/stats/" => "/usr/lib/cgi-bin/"
		)
	}
}
Looks like you have "ScriptAlias" defined, but compared to the lighttpd config, it looks incomplete? How does Apache know where the "/phpMyAdmin" folder is on the disk?
Reply With Quote
  #3 (permalink)  
Old 02-02-2010, 01:13 AM
Senior Member
 
Join Date: Mar 2009
Posts: 140
Default

as guy said, in your apache2.conf file there is an alias section and you use it as follows
Alias /phpmyadmin /pathtophpmyadminfolder
and also the security

<Directory /pathtophpmyadminfolder>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0