Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Jan 9, 2008

Xampp With Custom Port Setup

Usually IIS will occupied port 80 for those ASP.NET developer or some other reason, other application had grab over the port e.g: Skype.

In this case, we might need to use different port for Apache web server.
Recommend to port 88, 8088, 8888 and so on ( 8 looks and feel goods for me )

What changes need to be done?

1. Get your httpd.conf, usually located inside apache installation and inner conf folder.

Example of my httpd.conf location and I am planning to use 8088 as my custom port:
C:\xampplite\apache\conf\httpd.conf

2. Change the default Listen 80 to your custom port
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 8088

3. Change Server Name with the correct port too.
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:8088

4. Restart Apache server and you can browser with http://localhost:8088/


Incase you have problem to check your port, you can always run this application bundle with XAMPP named: xampp-portcheck.exe

It will shown you which port are occupied by which programs.


In case your 443 port being use by IIS and you are not using SSL on IIS.
You can try to stop your IIS and start Apache before IIS.
Hope this help.


Recomended Reading

Xampp With Multiple Sub Domain Setup

Let's say my IIS occupied port 80, and my XAMPP or XAMPPLITE on port 8088.
Assume that htdoc directory configure on C:/xampplite/htdocs/

Note:
email in the vhost has to be valid settings.
we might not need the error log or custom log in the vhost settings.

REPLACE all ( to < and ) to > Due To Blogger not allow those tags!

1.C:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1 mysubdomain2.test.com
127.0.0.1 mysubdomain3.test.com

This is for development settings, in actual, you can set this on your domain manager tools.


2. extra\httpd-vhosts.conf

#yeeling added
NameVirtualHost *:8088

#yeeling added
(virtualhost)
ServerName mysubdomain2.test.com
ServerAlias mysubdomain2.test.com
DocumentRoot "C:/xampplite/htdocs/webApp2"
ServerAdmin info@ethanliew.com
(/virtualhost)

#yeeling added
(virtualhost)
ServerName mysubdomain3.test.com
ServerAlias mysubdomain3.test.com
DocumentRoot "C:/xampplite/htdocs/webApp3"
ServerAdmin info@ethanliew.com
(/virtualhost)


3. extra\httpd-userdir.conf

#yeeling added
(Directory "C:/xampplite/htdocs/webApp2"
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
(/directory)

#yeeling added
(Directory "C:/xampplite/htdocs/webApp3"
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
(/directory)

4. Browse with Firefox:
http://mysubdomain2.test.com:8088/ goes to webApp2
http://mysubdomain3.test.com:8088/ goes to webApp3

Thanks to my good friend, yeesiang.com (sound likes my brother ) =)
Apache, and XAMPP !!