Domain name to apache server? no-ip.com?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mkx
    Confirmed User
    • Nov 2003
    • 4001

    #1

    Domain name to apache server? no-ip.com?

    So I got apache up and running on windows and want to point one of my domains to my ip address now. I tried to make an name server ns1.mydomain.com and ns2.mydomain.com to go to my fixed ip address but it's showing a 400 error. I also changed the domain in the httpd settings of apache to:

    # If your host doesn't have a registered DNS name, enter its IP address here.
    #
    ServerName www.mydomain.com:80

    Was this all I need to do? Maybe it takes more time to propagate the name servers. Should I maybe use a service like no-ip.com for this? Is there a better alternative service?
  • mkx
    Confirmed User
    • Nov 2003
    • 4001

    #2
    I googled it and it seems a did everything right, except I am using a rogers rocket stick which is a gprs usb dongle. I don't know how to find the "router" settings for it since its not technically a router. When i go to http://localhost/ or http://myip it brings me to my apache document root just fine so not sure if I do need to configure the stick somehow.

    Comment

    • Serge Litehead
      Confirmed User
      • Dec 2002
      • 5190

      #3
      you got to add A record in NS assigned for particular domain so domain will point to proper ip
      then make sure router forwards required ports, http is port 80 by default
      and pray that your ISP doesn't block commonly used ports, if it does. then you can use another port like yourdomain.com:88 (which also must be configured in apache and router)
      some ISPs may also recycle their IPs so your IP may change sometime. in which case you can hook it up somehow through dyndns.org or similar service.

      in your apache follow this example to setup vhost
      <VirtualHost *:80>
      ServerAdmin [email protected]lhost
      DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/docs/dummy-host.localhost"
      ServerName dummy-host.localhost
      ServerAlias www.dummy-host.localhost
      ErrorLog "logs/dummy-host.localhost-error.log"
      CustomLog "logs/dummy-host.localhost-access.log" common
      </VirtualHost>

      im not sure if "ServerName www.mydomain.com:80" correct and works

      Comment

      • Serge Litehead
        Confirmed User
        • Dec 2002
        • 5190

        #4
        router usually avail at http://192.168.1.1 if thats not the case than do "ipconfig /all" in command prompt and try ip of your gateway from that list

        Comment

        • mkx
          Confirmed User
          • Nov 2003
          • 4001

          #5
          Originally posted by holograph
          router usually avail at http://192.168.1.1 if thats not the case than do "ipconfig /all" in command prompt and try ip of your gateway from that list
          I am using one of those GPRS usb dongles. The IP isn't fixed but I am just tweeking around so when I need a fixed IP i'll use no-ip or another service, for now I just won't disconnect my internet.

          If I type my ip it goes right to my webserver. I did however type ipconfig /all and 2 DNS servers were listed, should I maybe change the ns1.mydomain.com and ns2.mydomain.com to these two ip's listed under the dns server results from the ipconfig /all?

          Comment

          • frank7799
            Confirmed User
            • Jul 2003
            • 1974

            #6
            You can setup a domain name-based or IP-based. Either way, if you do not set up virtual hosts properly, it won´t work. Here is an example for a name-based host:

            NameVirtualHost 172.16.1.100

            <VirtualHost 172.16.1.100>

            ServerName www.yourdomain.com
            ServerAdmin admin@ yourdomain.com

            DocumentRoot /var/www/hosts/www. yourdomain.com

            Error logs/ yourdomain.com -error_log
            Custom los/ yourdomain.com common

            <Directory /var/www/virt-bin/yourdomain/>
            AllowOverride None
            Options ExecCGI
            SetHandler cgi-script
            </Directory>

            </VirtualHost>

            Comment

            • Serge Litehead
              Confirmed User
              • Dec 2002
              • 5190

              #7
              Originally posted by mkx
              I am using one of those GPRS usb dongles. The IP isn't fixed but I am just tweeking around so when I need a fixed IP i'll use no-ip or another service, for now I just won't disconnect my internet.

              If I type my ip it goes right to my webserver. I did however type ipconfig /all and 2 DNS servers were listed, should I maybe change the ns1.mydomain.com and ns2.mydomain.com to these two ip's listed under the dns server results from the ipconfig /all?
              in short, no.
              i suggested ipconfig /all only to look for a gateway ip in order to try to get "router" admin.
              your domain's NS have nothing to do with your local internet config.

              you have to add domain name / ip pair at NS responsible for that domain ns1.mydomain.com

              while typing it i realized you have no DNS where you could add domain & your ip, which usually comes with web hosting. so scratch that. if you want to use your domain on local service you need to hook it up with some dynamic dns service, which may cost some

              Comment

              Working...