Options

Setting up @home web server

403Forbidden403Forbidden Member Posts: 88 ■■□□□□□□□□
Hello everyone!

I have a pet project that I am working on to help me with my web development skills and just as a general hobby.

I have a server, a domain and an internet connection.

I can point the A record to my public IP and forward port 80 to my server which is DMZ'd.

The server is running windows 7 pro x64. (Some old box lying around that i had a spare key for)

Using Wampserver for the web server platform.

Anyone have a good tutorial or general knowledge to help me get started?

I seem to get stuck with not being able to have someone outside of my lan be able to use the domain name to access the site rather than my public IP address.

Comments

  • Options
    ccnxjrccnxjr Member Posts: 304 ■■■□□□□□□□
    One snag I'd think you'd have is that most ISPs block port 80 and 25 on residential service.
    If someone could set you up with a shell account outside of your home you could always use "Curl" to verify that the web-server is actually working .
  • Options
    linuxloverlinuxlover Banned Posts: 228
    What exactly are you going to do with Windows 7, server-wise? Doing this stuff at home is not really worth it since you can get a W2k3Server VPS @ BurstNET for $8/month. You'd be missing out on a lot of things if you did that at home.
  • Options
    SteveFTSteveFT Users Awaiting Email Confirmation Posts: 149
    I agree with considering going the VPS route. I have 1000GB transfer, 512mb ram, and 20GB storage for $5/month. You don't have to worry about your ISP complaining, keeping the machine running 24/7, etc.

    That VPS is Linux OSes only I believe, which is probably better if you are trying to develop your skills. I think that being able to setup a web server remotely via command-line is more valuable than being able to install it on Windows 7. You would also have to do things such as properly configuring iptables.

    If you are strictly a developer, you might not have to do this in a production environment, but I cannot imagine that it would hurt.
  • Options
    santaownssantaowns Member Posts: 366
    I agree with a VPS, but if you have to do it at home, build it out on lan first, then forward the port to your webserver. VPS is much easier to work with and you can get windows or Linux. Learn IIS(Linux) and Apache(Linux/windows) or an apache alternative on linux. look at lowendbox to find a good deal on a vps.
  • Options
    403Forbidden403Forbidden Member Posts: 88 ■■□□□□□□□□
    I am familiar with VPS, that would be the easy way to do things were I seriously considering running a website. This is mostly for me to get some experience with building a web server from home just for fun.

    Port 80 is open, I have Time Warner Business Class so that was easy enough.

    I think I'm having issues with the apache server settings, DNS records are fine and I can access the webserver just fine from an external IP using my public IP but the server is not having a proper configuration. I've looked it up and even posted on the apache forums but nobody either knew how to fix the problem or just suggested VPS which while that would be fine were I trying to set it up for more than just an experience doing it.

    I ping my domain from an external source and my public IP is given after changing the A record for the DNS. I just get... 403 Forbidden errors whenever trying to view the web page using the public IP or the domain.

    Anybody have much experience configuring apache servers that could throw some help my way?

    Thanks again,
    403Forbidden
  • Options
    linuxloverlinuxlover Banned Posts: 228
    Tell us exactly what you did, more details you present more chances you have of someone helping you. Post the output of:
    dig domain.com
    dig ns1.domain.com
    dig ns2.domain.com
    named.conf
    hosts
    resolv.conf
    domain.com.db
  • Options
    wallpaper_01wallpaper_01 Member Posts: 226 ■■■□□□□□□□
    Why dont you...

    Set up a dynamic DNS. This follows your home IP address and if it changes it follows it and updates. You can usually set this up using the below, its free.

    Managed DNS | Outsourced DNS | Anycast DNS

    and you probably have a setting on your router to use it.

    THEN

    open port 80 on your router and direct traffic to the open port on your computer so 192.168.1.5:80

    WAMP should work out of the box.

    Not sure about the 403 error, it shouldnt happen. You could try deleting that and installing XAMPP, never had a problem with that from the outside.
  • Options
    ratbuddyratbuddy Member Posts: 665
    What does your .htaccess look like?

    (Or <Directory> section, of course :) )
  • Options
    CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    I just get... 403 Forbidden errors whenever trying to view the web page using the public IP or the domain.
    That right there leads me to believe it's not a DNS issue.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • Options
    403Forbidden403Forbidden Member Posts: 88 ■■□□□□□□□□
    @CodeBlox I know it is not a DNS issue....

    @Ratbuddy: Not sure what you mean by that, but..
    C:\WebServer\WWW <Is where I have my test page that I am trying to access and where I told it to look for in the HTTPD.Config file.

    @Wallpaper_101: I have a static public IP.

    @Linuxlover:

    Downloaded WAMPSERVER
    Installed it
    Opened up ports 80,443,8080,20,21 and confirmed that the ports were open from an external source.
    Changed my domain's DNS A Record from the parked IP to my Public IP.
    Pinged the domain address and it came back fine and listed my public IP which was good.
    Entered in my domain into a browser and it gave a 403 Forbidden error.
    I tried editing from Deny All, Allow None to Allow All, Deny None where a tutorial told me to, (Forgot where but backed up the files just in case it didn't work.)
    After that didn't work I came here to ask for some help.

    Thanks,
    403
  • Options
    ratbuddyratbuddy Member Posts: 665
    If you look in httpd.conf, you should see a section for <Directory "C:\WebServer\WWW"> or similar. Can you post the contents of that section, everything up to </Directory>?

    edit: I just noticed you used backslashes in the path. Change those to forward slashes, like c:/webserver/www, Apache doesn't work with backslashes AFAIK. Check your documentroot setting as well to make sure it's valid and not using backslashes.
  • Options
    santaownssantaowns Member Posts: 366
    ok, but is the page visible using localhost? is windows firewall on? did you setup the domain in apache ? what does your config look like?
  • Options
    403Forbidden403Forbidden Member Posts: 88 ■■□□□□□□□□
    santaowns wrote: »
    ok, but is the page visible using localhost? is windows firewall on? did you setup the domain in apache ? what does your config look like?

    The page is visible through localhost, but not through lan or external. Firewall exceptions were made, domain was specified in the config files.

    @Ratbuddy: This is the requested info.. I think? From the file httpd.config located at: C:\wamp\bin\apache\Apache2.4.4\conf

    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    #
    DocumentRoot "c:/wamp/www"
    <Directory "c:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important. Please see
    # core - Apache HTTP Server
    # for more information.
    #
    Options Indexes FollowSymLinks


    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    # AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All


    #
    # Controls who can get stuff from this server.
    #
    # Require all granted
    # onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from All
    Deny from none
    </Directory>
  • Options
    ratbuddyratbuddy Member Posts: 665
    Deny from none? Is that a even a thing? Try removing that line, for starters.
Sign In or Register to comment.