2 apaches = machine , but different port ?how?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

2 apaches = machine , but different port ?how?

Postby christoo » 11. January 2005 18:35

Hi everybody ¡¡¡

Does somebody know how I can install two apaches, but in only one machine ???

I'm working with one apache, but I have to stop it when I run lampp ('cos it has its own), but how I can work with both'????

do i just have to put the httpd.conf file in different ports ??? Create a virtual server ???

what's the best ???? or how '''''''??????? :roll:

Any advice ???

(this is just for fun... a simple doubt)
christoo
 
Posts: 8
Joined: 04. January 2005 16:31

Postby stoffell » 12. February 2005 23:09

The most simple way I think is to change the 'default' port 80 of one of your apache's.. For lamp you could change the "Listen 80" in /opt/lampp/etc/httpd.conf to something like 8080 or whatever..

cheers.
User avatar
stoffell
 
Posts: 11
Joined: 12. February 2005 22:57
Location: Belgium

Postby kkrodd » 22. February 2005 15:45

Thanks for the answer, but even changing the port to anothe number (in the "lampp" startscript and in the httpd.conf), the command "/opt/lampp/lampp lampp" gives me this message:

XAMPP: Starting Apache with SSL (and PHP4)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum http://community.apachefriends.org/f/


I am using another instance of apache (v1.3?) which serves a JSP/Jakarta web application (which have heavy dependencies/versioning requirements) which I need to run all the time, but I am planning to construct a website using a CMS which requires a more recent version of the PHP included in the old version.
kkrodd
 
Posts: 2
Joined: 22. February 2005 15:28

Postby stoffell » 22. February 2005 20:39

please first do a :
"/opt/lampp/lampp stop"

then do a 'netstat -ptan' and make sure you're not using a port number (in your lampp apache config) wich is being used in the output of netstat..

(feel free to post the output of netstat -ptan and the portnumber you use in apache)
User avatar
stoffell
 
Posts: 11
Joined: 12. February 2005 22:57
Location: Belgium

Postby kkrodd » 22. February 2005 23:58

Hello!

Thank you very much for your answer!

I made as indicated and edited the "/opt/lampp/etc/httpd.conf" and "/opt/lampp/lampp" files using some unused ports (as indicated in the netstat command end the "/etc/services" file).

The XAMPP apache started to run in the other port without any problem, and the "old" apache kept listening in ports 80 and 443.

The problem is that I need it the other way around, and it is not working!

As the old Apache is for running a web application, I can manage (in theory) to substitute the port it listens to for some other unused port just by informing the users of the new URL (which is just the same address with port appended).

All this with the purpose of leaving the XAMPP apache the standard port 80 and 443 for serving the "commercial/customer" pages that must be in a standard port so the visitors can access the site.

The process I followed was:

1- Stopping XAMPP
2- Restoring back the XAMPP configuration files that refers to standard ports 80, 443 and 3306.
3- Modifying the "old" apache config file in the directives:

Listen
Port

<IfDefine SSL>
Listen
Listen
</IfDefine>

with values used before in the XAMPP config file (which worked), but it didn't worked.

The "netstat -ptan | grep #port", didn't display the ports as active, so there must be something else to check that I don't know.

Thanks for any answer or pointing for this thread!

Carlos

P.S. I even stopped temporaly the Firewall just to check it wasn't blocking the ports, but that was not the problem.
kkrodd
 
Posts: 2
Joined: 22. February 2005 15:28

Postby stoffell » 23. February 2005 19:36

Indeed, it all makes sense..
Are you sure you've got all "Listen" and/or "Port" directives?

For example, Debian installations keep 'extra' config files in the /etc/apache structure that get included..

It might be worth looking at the /var/log/apache/*.log files, make sure you've got some logging enabled in the apache config.

ex:
ErrorLog logs/error_log
LogLevel warn
User avatar
stoffell
 
Posts: 11
Joined: 12. February 2005 22:57
Location: Belgium


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 16 guests