Sunday, July 27, 2008

WampServer 2.0 Port Configuration


Configure WampServer 2.0 on different (change port from 80 to 81)

I assume your server Configuration:
Apache Version: 2.2.
PHP Version: 5.2.6

Now that you have WampServer 2.0 installed, you'll want to use it along side with other servers such as IIS. This is easily done by changing the port that WampServer 2.0 listens to. I suggest changing the port from 80 to 81.

Use Notepad or WordPad to open the files below.

Open the httpd.conf file for the Apache server. On my machine, it's located here C:\wamp\bin\apache\apache2.2.8\conf\httpd.conf
Do a search for "Listen 80" and replace it with "Listen 81".
Save and close the file.

Open the wampmanager.tpl file. On my machine, it's located here: C:\wamp\wampmanager.tpl
Do a search for "http://localhost/" and replace it with "http://localhost:81/" (There are three total).
Do a search for "${w_testPort80}" and replace it with "${w_testPort81}".
Save and close the file.

Open the testPort.php file. On my machine, it's located here: C:\wamp\scripts\testPort.php
Do a search for "80" and replace it with "81" (There are three total).
Save and close the file.

Open the english.lang file. On my machine, it's located here: C:\wamp\lang\english.lang
Do a search for "$w_testPort80 = 'Test Port 80';" and replace it with "$w_testPort81 = 'Test Port 81';".
Save and close the file.

Right click on the WampServer icon and click on "Exit".
Restart your WampServer.

Congratulations! You have now changed your WampServer 2.0 to port 81. All of your links (localhost, phpMyAdmin, SQLiteManager) are configured to the new port and you can even test port 81 by going to the Apache Services.
If you found this helpful (or if you didn't), please
let me know.

20 comments:

Mads Borelli said...

Awesome man.. But which ports am I allowed to use for http?? Whenever I run something other than my Counter-Strike server, it's extremely slow. My counter-strike server runs fast and it's on 27015, so I set the http port to that, but it doesn't work.. Any solutions?

Anonymous said...

It works!
Thanks a lot!

Ranjitsingh Raghuwanshi said...

By default "http" works on port # 80.
You can configure the WampServer on any port except predefined ports.

aarone said...

This is a great post. Do you know of any similar gotchas for changing the mysql port. I changed it in my.ini, but don't see any obvious changes to the configuration.

Anonymous said...

Thanks, great post!

Nicolas (RetD) said...

Thanks for your post. Just the language file isn't always English file. I'm french ;)

ravi said...

Its working on other pc's in my office but not mine..I have made all the required changes as per instructed..Suggest some solution!!!

ravi said...

Please suggest some solution as soon as possible...Waitin for reply...

Theodosia said...

Thanks! It works VERY WELL with me!

Anonymous said...

Thanks! its working fine after changing port no.

amit sharma said...

thanks a lot ... .i dont have words to express ur help... thank you very much god bless u..

graham said...

Very helpful, spent all day trying to delete .Net and IIS services etc and yet the answer was so simple.

Thanks a bunh :)
Graham

Anonymous said...

Thank you very much

Anonymous said...

so much better than all the other stackoverflow and php wamp server forum solutions...this is the shizz

rahul kumar bhadani said...

Thank you so much for this method!!!I am very happy to see it working!

Thank you so much again!!

Anonymous said...

Thanks - your instructions saved me a whole lot of time!

tony said...

After a long search I finally found my solution on your post. Thanks a lot!

Anonymous said...

Excellent.... ur help saved my many hours... Thank you very much my friend
Bharat

Anonymous said...

Great job

Admin said...

Thanks, i do it