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
- Clamav 0.88.1 for Mandrake 10.0 Since, I've still got a few older Mandrake 10 installs that I'm maintaining as mailservers, there aren't supported security fixes for various things anymore... Friday there was news of a new clamantivirus to fix some security flaws with 0.88, new version is 0.88.1 I've taken the cooker srpm and recompiled......
- Evolution email error MAIL FROM command failed: Unknown Some time back, I was teetering on the brink.... I've used Evolution as my linux mail client for ages (since I switched), because it had the calender integrated etc... However, Kontact has REALLY looked nice for some time, but I didn't have time to mess with changing. Then one day,......
- 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......
- Dublin Ranch Golf Course Dublin Ranch Golf Course is located in: Dublin, CA Phone: 925-556-7040 Website: http://www.dublinranchgolf.com/ Course History: This course was designed by Robert Trent Jones, Jr and offers panoramic views of the surrounding breathtaking scenery. You'll be able to spot Mount Diablo and numerous other landmarks as you complete your round. The......
- Gold Tops Last Year's High I've been spending the past few days writing and re-writing B-school essays for the Jan 3rd deadline. Wasn't going to post until the 4th, but with gold breaking previous records, I just had too! Gold is currently trading for $857/oz, beating the previous high of $850/Oz that was set 28......
- Weight Tracking (Last Attempt) Total Weight Lost: 58lbs Here is my weight tracking page... It will evolve as I get more accustomed to my new lifestyle, but for starters if you want to know about the Jumpstart Medicine weight loss program that I am following read this post WeightLadder Reset — 390lbs and Starting......
- 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