How to run IIS 7 and XAMPP on the same machine and configure SSL certificate issued
by CloudFlare on Apache server
Hi viewers in this tutorial I will show you how you can setup the XAMPP on a machine
where the IIS server is also running with SSL setup.
Steps
---------
01.First Install the XAMPP server on the same machine where your IIS server is running. You can google and download the XAMPP latest version and install on the Machine. This machine can be window 2008 or any latest window Server.
02.Once you have finished the XAMPP installation then you need to do the first setting changes which are the default port for http (80) and https (443) for your XAMPP server. As you know you can’t run two web servers on the same port numbers.
03.So open the XAMPP control Panel and then click on Config Button -> Service and port setting -> On Apache Tab change the Main Port and SSL port to 8080 and 8443. As shown below screenshot
Very Important Note: If you are using the SSL certificate from Cloudflare and you have enabled the proxy for setting for your DNS record to hide the original IP address of the web server then you have to use some predefined ports by cloudflare. Since by default, Cloudflare proxies traffic destined for the HTTP/HTTPS ports listed below.
HTTP ports supported by Cloudflare:
80
8080
8880
2052
2082
2086
2095
HTTPS ports supported by Cloudflare:
443
2053
2083
2087
2096
8443
So we have chosen the port 8080 for http and port 8443 for https.If you don’t choose your custom port from the above list then you will not be able to access your website your FQDN when the proxy is enabled on your DNS Records as shown below
04.Now open the httpd.conf file by click on Config Button -> Apache (httpd.conf) as shown below screenshot
And then make the changes in the httpd.conf file you need to change the Listen port and ServerName setting as shown below
And change the ServerName as shown below
06. Also make insure that the following line in uncommented as shown below
07. Now you have to make changes in the httpd-ssl.conf file so select the config Button -> httpd-ssl.conf file as shown below
Now you have make the following changes in this files as shown below
This step is for configure the ssl certificate if you are not going to setup the ssl then you can skip this step.Now Create a Folder in location C:\xampp\apache\ssl and then copy your certificate hear you need three file as mentioned below
Your ssl certificate e.g example.com.cer
Your ssl certificate key e.g. example.com.key
Your ssl certificate CA root file e.g. cloduflare_origin_root.cer
Please see the below screenshots
08. Okay once you completed all the above steps now it’s time to start our Apache server on XAMPP and if everything goes well you can see that you Apache server is started without any issue and run on the port 8080 and 8443 as shown below
That’s it!!! I hope you like this tutorial please share this tutorial with others also and have a nice day!!!.