LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-09-2010, 10:34 PM   #1
poisonousbutterfly
LQ Newbie
 
Registered: Nov 2010
Posts: 10

Rep: Reputation: 0
configuring alias phpmyadmin in virtual host


hi everybody

i have linux server application based on centos 5 that run httpd daemon from /usr/local/pf/conf/httpd.conf which is generated from the
/usr/local/pf/conf/templates/httpd.conf.apache22 file

the problem is every time i run my linux server application i am not able to access phpmyadmin unless i stop my linux server application which is stop it httpd daemon then start "service httpd start"

i have been told by forum moderator to create an alias for my phpmyadmin in Virtual Host but it stil dont work, i am not able access my phpmyadmin site

this is what i have done to solve this problem
- open /usr/local/pf/conf/templates/httpd.conf.apache22 file then look for <VirtualHost *:%%admin_port%%>
- add Alias /phpmyadmin "/usr/share/phpmyadmin" (Failed)
- add Alias /phpmyadmin /usr/share/phpmyadmin (Failed)
- add Alias /phpmyadmin "/usr/share/phpmyadmin/" (Failed)
- add Alias /phpmyadmin /usr/share/phpmyadmin/ (Failed)

i am also set /etc/httpd/conf.d/phpmyadmin.conf with
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Allow from All
</Directory>

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

NB : my phpmyadmin is install on /usr/share/phpmyadmin with /etc/httpd/conf.d/phpmyadmin.conf as phpmyadmin configuration file

any idea why i still cant open my phpmyadmin site ? or why i cant run phpmyadmin together with my linux server application because it use the same daemon (httpd daemon)

thank you
 
Old 11-10-2010, 05:20 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Did you look at the Apache error log?
 
Old 11-10-2010, 05:45 AM   #3
poisonousbutterfly
LQ Newbie
 
Registered: Nov 2010
Posts: 10

Original Poster
Rep: Reputation: 0
i try to look at /usr/local/ but doesnt found apache.
 
Old 11-10-2010, 06:02 AM   #4
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Look at ErrorLog directive in the httpd.conf file.
 
Old 11-10-2010, 10:45 PM   #5
poisonousbutterfly
LQ Newbie
 
Registered: Nov 2010
Posts: 10

Original Poster
Rep: Reputation: 0
hi quanta

this morning i try to use other version of phpmyadmin,the way i install phpmyadmin is same
i use rpm package,this time i use phpmyadmin 2.11.9.6.1.el5.rf.noarch.rpm
after i install php-pdo and php-mysql depedencies i have succeed install phpmyadmin

i try to run phpmyadmin by running httpd daemon with service httpd start command,it success, then i try run httpd daemon with service packetfence start(my opensource program), it show that httpd daemon is running

then i try open phpmyadmin use http://192.168.1.10/phpmyadmin --> dont work
i try make alias on /usr/local/pf/conf/templates/httpd.conf.apache22

Alias /phpmyadmin /usr/share/phpmyadmin

then i run service packetfence restart, i try open https://192.168.1.10:1443/phpmyadmin/

it show error : Existing configuration file (./config.inc.php) is not readable

look at google it say that this is permission problem

i run ls -l at /usr/share/phpmyaddmin it show the permission of config.inc.php
-rw-r----- 1 root apache 1763 Jul 10 02:20 config.inc.php

how do i fix this problem?
 
Old 11-10-2010, 11:14 PM   #6
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by poisonousbutterfly View Post
then i try open phpmyadmin use http://192.168.1.10/phpmyadmin --> dont work
What does "don't work" mean? Did you look at the error log? Did you read the phpMyAdmin document?
Quote:
Originally Posted by poisonousbutterfly View Post
i try make alias on /usr/local/pf/conf/templates/httpd.conf.apache22

Alias /phpmyadmin /usr/share/phpmyadmin

then i run service packetfence restart, i try open https://192.168.1.10:1443/phpmyadmin/

it show error : Existing configuration file (./config.inc.php) is not readable

look at google it say that this is permission problem

i run ls -l at /usr/share/phpmyaddmin it show the permission of config.inc.php
-rw-r----- 1 root apache 1763 Jul 10 02:20 config.inc.php

how do i fix this problem?
I'm not familiar with packetfense. Does it run as apache user?
Code:
# ps -ef | egrep 'packetfense|httpd'
 
Old 11-10-2010, 11:51 PM   #7
poisonousbutterfly
LQ Newbie
 
Registered: Nov 2010
Posts: 10

Original Poster
Rep: Reputation: 0
@quanta

just got works open phpmyadmin from https://192.168.1.10:1443/phpmyadmin after i change config.inc.php permission into 664

question : is set the permission file into 664 quite secure ?
664 means owner has read and write permission; group has read and write permission ; other only has read permission

previously -rw-r----- , in numeric 640 means owner has read write;group has read and other nothing.

# ps -ef | egrep 'packetfense|httpd'

how do i know the result of that command show it run as apache user ?

this the command result
/conf/httpd.conf
pf 2863 2809 0 02:34 ? 00:00:00 /usr/sbin/httpd -f /usr/local/pf
/conf/httpd.conf
pf 2864 2809 0 02:34 ? 00:00:00 /usr/sbin/httpd -f /usr/local/pf
 
Old 11-11-2010, 12:40 AM   #8
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by poisonousbutterfly View Post
# ps -ef | egrep 'packetfense|httpd'

how do i know the result of that command show it run as apache user ?

this the command result

Code:
pf      2863    2809  0 02:34 ?      00:00:00 /usr/sbin/httpd -f /usr/local/pf/conf/httpd.conf
You should put the command output into [ code ] tag to keep formatting.

From the above result, look at the first column, your Apache run as the pf user, therefore you should change the group to pf:
Code:
# chgrp pf /path/to/config.inc.php
and change permission back to 640.
 
1 members found this post helpful.
Old 11-11-2010, 01:47 AM   #9
poisonousbutterfly
LQ Newbie
 
Registered: Nov 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you

Thank You Very Much Quanta

It Works..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring host.allow & host.deny files gardenair Linux - Newbie 7 05-11-2010 07:27 PM
Configuring Apache Virtual Host cmnorton Linux - Server 1 01-21-2009 06:50 PM
guidance required for configuring virtual host yogesh619 Linux - General 1 10-09-2008 11:49 PM
Phpmyadmin make apache crash when used as Alias sylvaticus Linux - Server 1 07-08-2007 04:47 AM
configuring secured name based virtual host bzlaskar Linux - Security 4 04-19-2007 06:05 AM


All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration