LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DSL Webserver and Network Trouble (slackware) (https://www.linuxquestions.org/questions/linux-networking-3/dsl-webserver-and-network-trouble-slackware-167838/)

hcubed 04-08-2004 02:14 PM

DSL Webserver and Network Trouble (slackware)
 
I know there are bits a pieces of the following questions all over the forums but I was not able to find an exact solution. I apologize in advance for any repitition.

I have SBC DSL with the "Home Portal" modem. My home network has two comps: a slow linux box with an Apache webserver running on Slackware and a new windowz box with XP Pro. I have the webserver working, it's dumbbox.dyndns.org and I also have Samba running properly so I can access files on the windowz box from the linux box.

The problem is this: If you go to the website and click "pictures" it gives a bad gateway and you can see why. Rather than accessing "dumbbox.dyndns.org/pictures" it tries to access "dumbbox.gateway.2wire.net/pictures/". Now, "gateway.2wire.net" is what I use in my local network to setup my router/dsl modem. The dumbbox.dyndns.org DNS points to "69.0.72.226", but that's the IP of my router/dsl modem, not the actual webserver. Do you see the problem? For some reason its trying to access the "pictures" folder on my router's IP rather than that of my webserver. However, I would also think this would make it so I couldn't get to the dumbbox.dyndns.org webpage at all, but that does load. Also, I'm not sure if it matters, but the "pictures" directory is actually a remotely mounted Windows directory done through SMB. Any ideas?

Oh, here's the ifconfig -a off the webserver:

root@dumbbox:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:08:A1:5C:D6:F0
inet addr:172.16.1.34 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:705 errors:0 dropped:0 overruns:0 frame:0
TX packets:516 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:65974 (64.4 Kb) TX bytes:57117 (55.7 Kb)
Interrupt:11 Base address:0x5000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

Thanks so much!

hcubed 04-08-2004 02:19 PM

PS. I used "netconfig" that came with Slackware to setup the network stuff. Here is some of my rc.inet1 in case you need it:

RC.INET1

# Edit these values to set up your first Ethernet card (eth0):
IPADDR="127.0.0.1" # REPLACE with YOUR IP address!
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth0 using DHCP:
USE_DHCP=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"

# Edit these values to set up your second Ethernet card (eth1),
# if you have one. Otherwise leave it configured to 127.0.0.1,
# or comment it out, and it will be ignored at boot.
IPADDR2="127.0.0.1" # REPLACE with YOUR IP address!
NETMASK2="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth1 using DHCP:
#USE_DHCP2=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME2="CCHOSTNUM-A"

# Edit the next line to point to your gateway:
GATEWAY="" # REPLACE with YOUR gateway!

# You shouldn't need to edit anything below here.

Bean101 04-08-2004 04:36 PM

edit /etc/apache/httpd.conf

find the section about servername
#
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
#ServerName midas.slackware.lan

under #ServerName midas.slackware.lan
put

ServerName dumbbox.dyndns.org

restart apache
/etc/rc.d/rc.httpd restart

that should do it.

hcubed 04-12-2004 11:02 AM

Thanks so much, that solved the problem! Sorry for getting back so late but I wasn't around this weekend.

Bean101 04-12-2004 09:55 PM

yea np man, thanks for the update :)


All times are GMT -5. The time now is 03:49 AM.