In the last few days, I had to set up something a bit unusual with apache. Basically the goal was to have apache listen for connections on two different ports (the standard port 80 and an alternate port 85). The problem was that I wanted different content at each port. Port 85 was to be an .htaccess redirect for another domain (with some port forwarding magic at the firewall.) Port 80 was to remain an internal intranet page. So…. this was all done with vhosts (virtual hosts.)
The previous setup had been apache for port 80 and thttpd for port 85, but there were disadvantages with that setup (thttpd didn’t support .htaccess redirects that I could see and that solution had to resort to a redirect in an html page which wasn’t as clean a redirect.) On the Mandrake based server it was fairly simple…. in /etc/httpd/2.0/conf/vhosts/Vhosts.conf I had to setup the virtual host settings (default directory/address/port to bind…)
And in /etc/httpd/2.0/conf/httpd2.conf, I had to add port 85 to be listened to (and uncomment the include of the Vhost file…)
#Removed by Apache 2.0 — Port 80
There’s a good writeup at apacheweek on virtual hosts and configuring them based on ip address and port.
Related PostsRelated Posts
- Remote Tech Support with x11vnc and wrapper script So, the idea is that I wanted something "like" the Ultranvnc Single Click download, only for linux. The main idea being is that if someone is looking for a bit of desktop tech support on linux, we don't need to be giving instructions for 5 different package managers, or source......
- x11vnc slow internet initial-connection performance - identd timeout So, I had the script all ready, I've got my x11vnc custom compiled to be as widely compatible as possible, I've tested thoroughly on the internal network. The next step was to test my x11vnc "one cut and paste" script over the internet. So, I visited my parents pc which......
- Codeweavers announces 2005 and 2006 plans I saw this last week but never took the time to mention it. Codeweavers has announced their roadmap for 2005 and 2006. Codeweavers of course is the company that makes crossover office (a wine implementation to allow several windows applications to run under linux). Codeweavers is a major contributor to......
- Give Whole Life Insurance a Fair Comparison – Get Illustrations and Compare! I hope this post doesnâ€™t end up on one of my favorite blogs, Bad Money Advice, but I wanted to actually compare some numbers for people.Â Everyone, and I mean everyone tells you to stay the hell away from Whole Life Insurance, I think the main concerns are fees,......
- One Hundred Pushup Challenge -- Knee Push ups, 1 Handed Knee Pushups, and Full Push ups Well if you haven't heard by now then you aren't paying attention to the Health and Fitness blogosphere... Everyone is doing the 100 push up challenge at 100 push ups. It is a 6 week training program geared toward a final test where 100 consecutive pushups are completed. (My first......
- Using Whole Life Insurance to Create a Pension Income Stream Today I am presenting a guest post from a fellow personal finance blogger who proposes an interesting strategy for using whole life insurance as a way to generate retirement income. I will have some comments about this strategy at the end of the post. Evan from My Journey to Millions......
- bbpress mod_rewrite Woes
- WordPress Fancy Permalinks not working Giving 404 error
- Apache2 not starting because of ssl_scache file
- Saving you from yourself or specifying which index file to use with apache
- Custom Error Pages with .htaccess