login about faq

I'm working with two projects, one that works with mysql and another that should work with postgre so I'm planning to install a separate apache server on my machine which has wamp installed. Will it work?

asked Jul 05 '11 at 15:25

Glom's gravatar image

Glom
434


The short answer is yes. You just need to point the other to a different port (since both will try to use the default port, which is 80). In your httpd.conf file, find the line that says Listen 80 and change it to some other value (e.g. Listen 81)

Personally, I make use of (Named) Virtual Hosts. In your WAMP, you may configure your httpd.conf or extras/httpd-vhosts.conf to add multiple VirtualHosts.

Here's a sample configuration that you can add to those configuration files:

<VirtualHost *:80>
  ServerName yourproject.local
  DocumentRoot /path/to/your/project/

  <Directory /path/to/your/project/>
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
<VirtualHost>

Then I append the following in my hosts file /etc/hosts in Linux and C:/WINDOWS/system32/drivers/etc/hosts in Windows XP:

127.0.0.1 yourproject.local

Notice the the value of the ServerName directive in the configuration file is the same as the one that I appended in the hosts file.

link

answered Jul 05 '11 at 15:48

Randell's gravatar image

Randell ♦♦
1.6k1529

edited Jul 05 '11 at 15:52

1

Ok. Thanks kuya randell!

(Jul 05 '11 at 17:39) Glom Glom's gravatar image
1

what i did is make the xampp be port 80, the OTHER apache port 8080 - Change your Listen:80 to Listen:8080 for the OTHER apache .conf file. Now they both connect to the same mysql (xampp's) but that is alright. I just wanted to have a secret "homepage" which only I know the port number. I also was testing whether I can install apache + php without xampp, and it's easy - just remember the gotcha where you have to unzip the php zip file into php's directory to get the php5_apache2.2.dll file in place

(Jul 05 '11 at 23:35) whatever whatever's gravatar image

Thank you for the replies/answers, I followed your instructions and the installation was successful. Thanks!

(Jul 11 '11 at 15:20) Glom Glom's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×5
×4

Asked: Jul 05 '11 at 15:25

Seen: 662 times

Last updated: Jul 11 '11 at 15:20