General
cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Apache & MySQL under my home direcctory

SOLVED
Go to solution
Neeraj_7
Frequent Advisor

Installing Apache & MySQL under my home direcctory

Can i install Apache webserver & MySQL database server under my home directory on Red Hat linux machine. The server already has apache running under root on default port. I want to install it under some other port since i do not have root access and i have to run some CGI scripts.
can someone of u outline the steps involved and also list down the problems if any.
most importantly has anyone of u tried this thing.
18 REPLIES
Fred Ruffet
Honored Contributor

Re: Installing Apache & MySQL under my home direcctory

You can achieve this, not using RPM. Use tarballs you can find on their sites and uncompress to your home.

You won't be able to use a port under 1024 if you're not root. Be carrefull not to use an already used port. Also, be sure there's no FW blocking the port you want.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

i installed apache 1.3 version in my home directory .i installed it under port 8888. everything seems to be working fine. the document root is also set to $HOME_DIR/apache/htdocs. but if i access the page from outside using http://servername:8888 , it gives a Page not found, Cannot find server or DNS Error.

I checked the httpd processes also, they are also running fine.

Can anyone of you point out the problem which is occuring.
Vid Luther
Advisor

Re: Installing Apache & MySQL under my home direcctory

the error you're getting is an IE specific error, and since IE gives the same error for everything, try adding a / after the :8888

also, test locally with links or lynx to make sure it's running fine.
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

i have tried added a / after 8888 as pointed by you. also i have tested locally with wget , its giving the correct page.
Steven E. Protter
Exalted Contributor

Re: Installing Apache & MySQL under my home direcctory

If your goal is to install the binaries under /home you have to do a special install and probably need to compile the application.

If you want to run websites under the /home directory thats a very simple thing to do.

Here is some code from my httpd.conf file.

Here is my documentroot directive:

DocumentRoot "/home/webusers/investmenttool/htdocs"




ServerAdmin sprotter@investmenttool.com
DocumentRoot /web/chicago50thward/htdocs
ServerName chicago50thward.org.com:80
ServerAlias www.chicago50thward.org
ScriptAlias /cgi-bin/ "/web/chicag50thward/cgi-bin/"
ErrorLog logs/chicago50thward.org.error_log
CustomLog logs/chicago50thward.org.access_log common



Notice the location. Change web to /home/web or /home/www or anything else you want.

There we go.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

you mean to say that i have to set virtual host.
as said by you i have already installed it under my home directory /home/users/nkumar/apache. I configured it using ./configure --prefix=/home/users/nkumar/apache.

after installation i have changed the port to 8888 and user & group to my user & group in httpd.conf file since there is another apache server running under default port i.e. 80. i have checked the processes , they r running fine.

can you tell me any other thing i have to do.
Johannes Krackowizer_1
Valued Contributor

Re: Installing Apache & MySQL under my home direcctory

hi neeraj kumar,

perhaps your dns is broken. try to type http://:8888/ for example:

http://192.168.100.200:8888/

best regards,

johannes
"First off, I'd suggest printing out a copy of the GNU coding standards, and NOT read it. Burn them, it's a great symbolic gesture." (Linus Torvalds)
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

hi

i have alreday tried http://ipaddress:8888 also , that also gives the same page not found error.

DNS is okay, i have checked with nslookup.
Vid Luther
Advisor

Re: Installing Apache & MySQL under my home direcctory

if it's working locally, but not when you try from a different machine.. this is a dns issue. When you ping the domain you want to get to from your test machine, do you get the same ip as the box ? Are you sure there are no port fowarding rules etc ? What happens when you use firefox or opera ?
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

hi

yes i have verified that also. when i ping the machine it gives the same ip address as that of machine.i guess DNS is okay.
Vid Luther
Advisor

Re: Installing Apache & MySQL under my home direcctory

when you telnet to port 8888 what do you get ?
also check to see port 8888 is allowing inbound connections from outside on the server itself.
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

yes , i have checked using netstat that the port 8888 is open and accepting inbound connections.
Fred Ruffet
Honored Contributor

Re: Installing Apache & MySQL under my home direcctory

this may not be a DNS problem if you connect to http://IP:8888/

Could you post your http.conf file here ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

Hi Fred,

i m enclosing my httpd.conf over here. Plz look over & tell me if there is some problem.
Vid Luther
Advisor

Re: Installing Apache & MySQL under my home direcctory

this looks like a generic httpd.conf it should be working.. but just for fun, uncomment the Listen line where it has ipaddress:port

and make it the ipaddress:8888 of the box you want it to be..or just say Listen 8888

I've always used that to move my servers, never the Port feature..
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

Hi Vid,

U r right, for fun i tried uncommenting that listen line also. That also didn't work. But if though the line is commented, i have checked using netstat that the port 8888 is open for inbound connections because in httpd.conf file , it has been specified as 8888 under port.

Steven E. Protter
Exalted Contributor
Solution

Re: Installing Apache & MySQL under my home direcctory

Just found a syntax error in my config, the hard way at a private customer site.

Ooops!

ServerName chicago50thward.org.com:80

should read

ServerName chicago50thward.org:80

Smiles.

Happens to saladbrains too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Neeraj_7
Frequent Advisor

Re: Installing Apache & MySQL under my home direcctory

Hello Steven

I am ataching my httpd.conf file over here. Can you plz have a look at it and suggest me if there is any problem. I have tried setting up Virtual host also as seen in file ,(the lines are currently commented), but that also didn't worked.