Ticket #1275 (new enhancement)

Opened 1 month ago

Last modified 1 month ago

I need port 80 but don't want to move httpd

Reported by: frater Assigned to: somebody
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:

Description

httpd binds to all IP's so I am unable to use port 80 unless I move httpd. I don't want to. I configured an extra IP (192.168.240.1/24) on the bridge and run xinetd on port 192.168.240.1:80 for this special website using "-i -h /opt/var/www" and another xinetd entry is running the normal webif on all other interface with "-i " (inetd-mode)as its only parameter.

Before writing my script I worked on a proof of concept and everything works except one thing..... This website is now giving 404's instead of DD-WRT's webif. It works with any other home directory I point httpd to. If I connect to 192.168.240.1 I'm getting website1 and on 192.168.10.1 I'm getting website2... It just doesn't work with DD-WRT's website...

All this has to do with your webif protection to discourage rebranding. I'm not interested in rebranding, but I do need that port 80.

So can you tell me how I can get dd-wrt's website to run on port 80 with leaving me 1 IP?

Change History

10/23/09 21:05:39 changed by frater

PS /usr/sbin/httpd doesn't support -i (inetd mode). If this is changed it may probably work as well...

10/24/09 13:27:09 changed by frater

"working" proof of concept: wget http://wd.mirmana.com/S95pixelserv

I'm using Optware's httpd -i to see it is working...

On 192.168.240.1 I'm getting httpd with its homedir in /opt/var/pixelserv On 192.168.10.1 I'm getting httpd with its homedir in /opt/var/www

Because /usr/sbin/httpd doesn't support -i all this doesn't work as intended. Optware's httpd (busybox) doesn't see DD-WRT's homedir...

root@WAN:/opt/etc/pixelserv# /opt/etc/init.d/S95pixelserv stop Removing http-services from xinetd xinetd: Restart xinetd xinetd: Stop xinetd xinetd: Start xinetd Starting the normal http-service on port 80 Normal http-service started tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 10822/httpd root@WAN:/opt/etc/pixelserv# /opt/etc/init.d/S95pixelserv start Stopping the normal http-service on port 80 Signalling xinetd to reread config for normal http-services Signalling xinetd to reread config for pixelserv root@WAN:/opt/etc/pixelserv# /opt/etc/init.d/S95pixelserv status xinetd manages port 80 on these IP's

192.168.10.1: /opt/sbin/httpd -i -h /opt/var/www 169.254.255.1: /opt/sbin/httpd -i -h /opt/var/www 127.0.0.1: /opt/sbin/httpd -i -h /opt/var/www 85.191.0.241: /opt/sbin/httpd -i -h /opt/var/www 192.168.240.1: /opt/sbin/httpd -i -h /opt/var/pixelserv