webhosting

hi everybody,

i am trying to host own website on my laptop, but i cant get access to it. the following is done :

  • appache2 server package is installed and running
  • i made a sample html file and stored it in /srv/www/htdocs
  • i got a free domain name from DynDNS.com
  • firewall ports are open for appache 2 and appache ssl
  • http and https services are allowed to run behind firewall

typing www.mhawwas.homeftp.net gives up the following message
“Firefox can’t find the server at www.mhawwas.homeftp.net.”

when i try to access the server via ip address i got the message " You don’t have permission to access the requested directory. There is either no index document or the directory is read-protected.If you think this is a server error, please contact the webmaster. ERROR 403 Wed Mar 3 14:10:21 2010
Apache/2.2.14 (Linux/SUSE)"

please help me if i miss something .

regards

you need to update your DynDNS to point to your IP address. You can use “ddclient” for that which is a daemon lurking in the background and reporting IP changes to DynDNS. You can get ddclient from the repos (I think packman). Obviously, after install & config, make sure to enable the ddclient service to start on bootups

also, you need to have a index.html (or index.php) file in /srv/www/htdocs as by default, that’s what apache is looking for. You can configure it to look for another file by default, but it’s up to you. Also, remove the www from your URL so it’ll be http://mhawwas.homeftp.net/

Thanks for quick feedback!
it is working now but because i am behind a DSL modem, the configuration page of this modem is displayed instead of my home page . do you have an idea how to let DNS server recognize my laptop?

As I said, you need to install ddclient and configure it so it can pass your IP to DynDNS to attach it to your registered hostname. I don’t know why you get a config page of the modem (are you sure you’re typing in correctly your IP?). Make sure to start ddclient by issuing as root on console: rcddclient start and add it to the boot with chkconfig -a ddclient. If you prefer GUI setup, you can do that in the runlevel of YaST, but it only does start up and adding it to the boot process. The configuration of ddclient needs to be done manually. An example, here’s mine

daemon=600                  # check every 600 seconds
syslog=yes                  # log update msgs to syslog
mail-failure=your@mail.com # Mail failed updates to user
pid=/var/run/ddclient.pid   # record PID in file.

## Detect IP with our CheckIP server
use=web, web=checkip.dyndns.com/, web-skip='IP Address'

## DynDNS username and password here
login=your_login
password=your_password

## Default options
protocol=dyndns2
server=members.dyndns.org

## Dynamic DNS hosts
http://mhawwas.homeftp.net

That’s all you need. Change the email above, the login & password stuff and that’s it. After that start ddclient as shown above

On 03/03/2010 05:56 PM, mhawwas wrote:
>
> Thanks for quick feedback!
> it is working now but because i am behind a DSL modem, the
> configuration page of this modem is displayed instead of my home page .
> do you have an idea how to let DNS server recognize my laptop?
>
>

Your external ip address is obviously the one of the DSL box.
When you request the address the page is shown.

What is your laptop’s ipaddress? (/sbin/ifconfig)
Maybe 182.168.x.x os 10.x.x.x?

You need to direct the ftp and http ports to your laptop.
You can do this in your modem configuration page.

Vahis

“Sunrise 7:15am (EET), sunset 5:49pm (EET) at Espoo, FI (10:34 hours
daylight)”
http://waxborg.servepics.com
Linux #1 SMP 2010-01-14 18:58:36 +0100 x86_64
7:01pm up 11 days 11:30, 7 users, load average: 0.16, 0.17, 0.11

my ip address is 192.168.1.100 and dccclient is installed.
when i type rddclient start i get the following message:

// If ‘rddclient’ is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf rddclient
//

from the modem (livebox) i opened ports to my website in dns config but still i get the webpage of the modem. i am also behind a router (linksys), and i applyed port forwarding to my pc , but this also didnt solve the problem.

On 03/10/2010 08:46 AM, mhawwas wrote:
>
> Vahis;2130027 Wrote:

>>
>> Your external ip address is obviously the one of the DSL box.
>> When you request the address the page is shown.
>>
>> What is your laptop’s ipaddress? (/sbin/ifconfig)
>> Maybe 182.168.x.x os 10.x.x.x?
>>
>> You need to direct the ftp and http ports to your laptop.
>> You can do this in your modem configuration page.
>>

> my ip address is 192.168.1.100 and dccclient is installed.
> when i type rddclient start i get the following message:
>
> // If ‘rddclient’ is not a typo you can use command-not-found to lookup
> the package that contains it, like this:
> cnf rddclient
> //

I don’t know this client so I can’t help there.
It seems to work though:
>
> from the modem (livebox) i opened ports to my website in dns config but
> still i get the webpage of the modem.

This means the client apparently works, it finds your modem’s external
address.
Of course it can be someone else’s :slight_smile:

Go to this page to see your external address:
http://www.ip-adress.com/

Then command ‘host yourhomepage.com’ or whatever name your homepage has.
It should give you the same address as above if the client works ok.
If not there’s something wrong with the client and you must fix that as
a separate issue.

Point the browser to your real external IP.
To make sure, from another address, a smartphone for example or ask a
friend to do it. Sometimes you cannot access a service running in
192.168.x if you try it from the same address. This is something that
needs to be addressed separately.

But if this, attempted from another address gives the modem’s homepage
there’s something wrong with port forwarding/firewall…

i am also behind a router
> (linksys), and i applyed port forwarding to my pc , but this also didnt
> solve the problem.

If you have a web server running in 192.168.1.100 (this needs to be a
fixed address) you need to direct port 80 from “any” to 192.168.0.100.

You also need to open this port in the firewalls, both in your machine
and the router/modem…
Disable first the firewalls altogether, then find out how to properly
direct the port.
When this succeeds, configure the firewalls.

Oh, check also locally, ‘http://localhost’ to make sure you have the
service running properly :slight_smile:

Vahis

“Sunrise 6:55am (EET), sunset 6:07pm (EET) at Espoo, FI (11:12 hours
daylight)”
http://waxborg.servepics.com
Linux #1 SMP 2010-01-14 18:58:36 +0100 x86_64
5:55pm up 18 days 10:24, 14 users, load average: 0.18, 0.14, 0.05

Interesting post dude…discussion are always helpful in one way or the other. Thanks for giving out information. It’s really nice and mean full.

I have read this thread searching for more informations concerning same type of issue.
The problem is that even if port forwarding redirects all packets from port 80 at the routers ip address to internal “LAN” server IP address each time I type the router’s IP address I never have the apache server’s web pages but the router’s admin portal…

The router’s address is a class A address starting with 80.xxx.xxx.xxx and this one should be routable thru a router ^^
Each time I type (from a computer located at the outside of the lan) http://80.xxx.xxx.xxx I get the admin portal.

I planed to use “bind” to resolve hostnames (using port forwarding for the dns information traffic, opening the port 53) but if the port 80 won’t work I won’t go further. I will add “my” bind server’s ip address in the dns list at the client side. It worked perfectly before I changed from cable to adsl technology.

Anyone knows dlink 2640B router ?

Why the port forwarding is not running as expected: silently relaying port 80 request from the outside to the apache server ?

Thank you for your patience…

Sounds like that router was designed that way, that port 80 goes to its admin page, even from the outside. That sounds dangerous actually, I wouldn’t want outside people to be able to access the admin page even if a password is required.

Maybe you can reconfigure your router to use another port for admin, or turn off this behaviour (being able to access the admin page from the outside). It’s all model dependent.

ken yap wrote:

>
> Sounds like that router was designed that way, that port 80 goes to
> its admin page, even from the outside. That sounds dangerous actually,
> I wouldn’t want outside people to be able to access the admin page
> even if a password is required.
>
> Maybe you can reconfigure your router to use another port for admin,
> or turn off this behaviour (being able to access the admin page from
> the outside). It’s all model dependent.

I would certainly expect to be able to restrict the admin interface to
the local network only.


Per Jessen, Zürich (19.7°C)
http://en.opensuse.org/User:Pjessen

That’s right… but there is a lot of chance to never found the public ip address for this router but I read interresting hints concerning the shift of the router’s admin port… I will look if this feature was available I think that it will solve the issue (if the router first check on port 80 for admin purposes… it “intercepts” the requests to the web server and bypasses the port forwarding… why not).

Thanx, I’ll get back later