Posted: Sun Sep 14, 2008 7:09 Post subject: More than 1 webserver behind DD-WRT
I'm running several webservers behind my router and want them all to be accessed using port 80 using subdomains. I have a toplevel-domain with a wildcard which points to my IP-adress. Previously everything went to my Fedora Linux-server.
Now everything goes directly to its appropriate server based on the requested host.
Hosts defined on the DD-WRT will get automatically in the configuration.
Here are the steps to install all this (edited on 23-9-2008):
Install Optware
Install libuclibc++ (/opt/bin/ipkg-opt install libuclibc++)
Install pound (/opt/bin/ipkg-opt install pound)
make a startup script
make a script to write the config
Enter a firewall rule
Make sure everything is started
Service "loadbalancing"
HeadRequire "^Host:[\t ]*bbs\.mirmana\.com$"
BackEnd
Address 192.168.10.130
Port 80
End
Backend
Address 192.168.10.120
Port 80
End
End
Service "ASSP"
HeadRequire "^Host:[\t ]*assp\.mirmana\.com$"
BackEnd
Address 192.168.10.130
Port 55555
End
End
Service "2 domains"
HeadRequire "^Host:[\t ]*(subdomain1|subdomain2)\.mirmana\.com$"
BackEnd
Address 192.168.10.210
Port 9091
End
End
Service "Default"
BackEnd
Address 192.168.10.130
Port 80
End
End
End
Startup code:
Code:
/opt/etc/init.d/S80pound start
Firewall:
Code:
iptables -I INPUT 1 -p tcp --dport 8080 -j ACCEPT
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Aha... thanks...
I wait for comments and ideas of others...
Are you installing it? _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
No-one tried it yet?
I've seen several people asking for this feature....
I need testers!!! _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Posted: Tue Oct 14, 2008 9:46 Post subject: My Setup
Here's a description of my current setup:
1 wrt54g-tm build 10328
1 Ubuntu web server with port 80 forwarded to server ip, there are a total of 3 websites hosted on this server.
I need to host one more web server appliance on the wrt54g-tm.
Ready to test this out, not sure how to begin though if anyone can help! _________________ Router Model: Buffalo WZR-HP-AG300H
Firmware Version: Firmware: DD-WRT v3.0-r46733 std (05/21/21)
Kernel Version: Linux 3.10.108-d11 #81419 Fri May 21 12:44:07 +07 2021 mips
_________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Posted: Thu Oct 23, 2008 16:43 Post subject: Re: My Setup
graegos wrote:
Here's a description of my current setup:
1 wrt54g-tm build 10328
1 Ubuntu web server with port 80 forwarded to server ip, there are a total of 3 websites hosted on this server.
I need to host one more web server appliance on the wrt54g-tm.
Ready to test this out, not sure how to begin though if anyone can help!
Are you still there...??
I took some extra effort to make it easy for you... _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Posted: Sat Dec 13, 2008 8:11 Post subject: Reverse Proxy Included in Mega Build?
Hi Frater, this is all too complex, and I could imagine the nightmare of having to redo & re-enter everything every time I upgrade firmware for the router. I see you entered a ticket to have this implemented possibly in a mega build:
This would be a more reasonable implementation option and I would like to thank you for trying to get this accomplished. _________________ Router Model: Buffalo WZR-HP-AG300H
Firmware Version: Firmware: DD-WRT v3.0-r46733 std (05/21/21)
Kernel Version: Linux 3.10.108-d11 #81419 Fri May 21 12:44:07 +07 2021 mips
Last edited by graegos on Sat Dec 13, 2008 8:33; edited 1 time in total
Please add a comment to TRAC stating you would like to get it too.... _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
Frater, I see pound has been added and you have made a few more posts in the bug trac area, when can we potentially test this reverse proxy? _________________ Router Model: Buffalo WZR-HP-AG300H
Firmware Version: Firmware: DD-WRT v3.0-r46733 std (05/21/21)
Kernel Version: Linux 3.10.108-d11 #81419 Fri May 21 12:44:07 +07 2021 mips
I'm waiting for a binary that has pound included. I mailed Eko some scripts and maybe he incorporates them as well...
It's quite easy for me because I also know how it's supposed to work in concept. I think there are a lot of DD-WRT users who want this feature although they don't know it yet _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge
I wanted to wait a while to see if some scripts or commands could get incorporated, but it seems the devs have this on a very low priority.
Pound is incorporated in the mega-versions and USB-support has been enhanced. Are you able to use an USB-flash with ext-partition and load this as an /opt partition?
If so, I can write a tutorial that doesn't need optware....
Maybe write to brainslayer or make a ticket in TRAC? _________________ Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge