essay on programming languages, computer science, information techonlogies and all.

Thursday, July 21, 2016

Run Apache web server on top of IIS7

I am paying around 15000 won per month to run a Windows server 2008 remotely. This server has an static IP address - uvans. Installed a redmine and also Bonobo git server.

In addition to this IIS7 and programs, I want to run Django and tried to run it IIS7 but after all the effort, I found that Django not supporting fastcgi anymore. So it is not a recommended approach. The supported way is to run it with Apache web server.

Thankfully, Apache server can be run on Windows machine. First download windows installer from here. I unzipeed httpd-2.4.23-win32.zip to c:\apache24 and installed vcredist_x86.exe.

Then modification on the C:\Apache24\conf\httpd.conf as below. This is to get Apache responds to port 81. I have only 1 IP and no other way but to use another port number. Is 81 safe enough ?

Listen 0.0.0.0:81

ServerAdmin the.sungwoo@gmail.com
...
ServerName uvans.vps.phps.kr:81
...
AllowOverride All
...
DocumentRoot "c:/WebPages"
<Directory "c:/WebPages">

Then running the httpd service in command line as below.
C:\Apache24\bin>httpd -t
Syntax OK

C:\Apache24\bin>httpd -k install
Installing the 'Apache2.4' service
The 'Apache2.4' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.

C:\Apache24\bin>httpd -k start

C:\Apache24\bin>

Check the apache web service is running.
Then you can go to localhost:81 and see the index.html at c:\WebPages comes up
And make sure firewall is taken care of - allow Apache httpd.exe.
Then Apache served web page can be reached from the world.

No comments: