Skip to main content

Using IIS and XAMPP together

I am ASP.NET developer as well as a PHP developer. I have my visual studio installed in my laptop to work on asp.net/.NET and now I need to install XAMPP to work on PHP, MySQL, Apache and Perl. By default IIS uses port 80 and 443 for HTTP and HTTPS, and Apache also uses the same ports as IIS. Now to solve the conflict of ports there is only two way:
  1. Change IIS config – the hardest way
  2. Change Apache config – the easiest way
I choose to go with second option, and which is lot more easier. I installed XAMPP in my drive D:

I need to configure Apache to listen to port 8080.
  1. Edit file D:/xampp/apache/conf/httpd.config
  2. Find "Listen 80" and change it to "Listen 8080"
  3. Find "ServerName localhost:80" and change it to "ServerName localhost:8080"
Now I need to configure for SSL/HTTPS.
  1. Edit file D:/xampp/apache/conf/extra/httpd-ssl.conf
  2. Find "Listen 443" and change it to "Listen 4499"
  3. Find "VirtualHost _default_:443" and change it to "VirtualHost _default_:4499"
  4. Find "ServerName localhost:443" and change it to "ServerName localhost:4499"
Well that’s it, now apache is listening to port number 8080 and HTTPS/SSL is listening to port number 4499. You can assign any port number for respective apache HTTP and apache HTTPS/SSL.

Lastly make sure that you request XAMPP apache by specifying the port number i.e. http://localhost:8080. If not the request will be redirected to IIS, since it is listening on default port.

Comments

Popular posts from this blog

Know your Lha Zha, Sog Zha, Shi Zha

There is believe in Buddhism, that an individual person have got their own lucky day and bad luck day in a week. They are derived from the twelve animals similar to chiness horscope. Your birth year tells you which Buddhism zodiac sign you below to. Lha Zha and Sog Zha are belived to be good day while Shi zha is consider bad day.

IPTABLES

Under linux OS, we use iptables to secure the machine from any other external attack. In current scenario I am forwarding the packages from local interface to external interface and i have squid configured which will be acting as transparent proxy. Only selective port numbers are open for the network. 1. Save the script to a file. 2. Give permission to execute. chmod +x filename . 3. Execute the file as follows ./filename 4. save the output of the script to system iptables file, by running the command service iptables save 5. You are done, start/restart the iptables service. service iptables restart Script: #!/bin/sh # chmod +x file name to execute # eth0 LAN # eth1 WAN # Local IP range 192.168.0.0/25 # NATing # Transparent proxy iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A...