Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Ubuntu nameserver

  • 25-12-2005 8:15pm
    #1
    Registered Users, Registered Users 2 Posts: 15,544 ✭✭✭✭


    I've setup a site in apache2 that works just fine over the lan , but over the internet is another matter.

    Am struggling with nameservers.

    I just want www.mysite.net to point to my ip and let apache2 do the rest, but really am struggling with nameservers.

    The site is hosted with Apache/2.0.54 (Ubuntu) PHP/4.4.0-3ubuntu1 Server at 192.168.0.3 Port 80 ..ie current ubuntu with php etc

    How the heck do i set up a nameserver ?

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



Comments

  • Registered Users, Registered Users 2 Posts: 3,977 ✭✭✭mp3guy


    I recommend trying the ubuntu forums, or the #ubuntu channel on freenode (run xchat)


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Where do you want the site to be visible from?

    192.168.0.3 is a private address only, and you can't
    route it across the internet without using a vpn or similar.

    To install a nameserver on ubuntu, run
    sudo apt-get install bind9

    If you're not familiar with the file formats,
    installing webmin will give you a
    good frontend for setting up dns entries.

    What exactly are you trying to achieve?

    Happy Christmas,
    NiallB


  • Registered Users, Registered Users 2 Posts: 1,067 ✭✭✭tomk


    Do you actually need a name server? I reckon all you need to do is get your domain name if you haven't already done so, and then register with one of the many dynamic dns services. I use zoneedit myself. They'll take care of dns for you, Then you just forward port 80 on your router to that internal address, and you're all set.


  • Registered Users, Registered Users 2 Posts: 15,544 ✭✭✭✭Supercell


    niallb wrote:
    Where do you want the site to be visible from?

    192.168.0.3 is a private address only, and you can't
    route it across the internet without using a vpn or similar.

    To install a nameserver on ubuntu, run
    sudo apt-get install bind9

    If you're not familiar with the file formats,
    installing webmin will give you a
    good frontend for setting up dns entries.

    What exactly are you trying to achieve?

    Happy Christmas,
    NiallB

    Thanks Niall, I did that but still no joy :(

    I've set the router to forward on traffic to the ubuntu box, the site is visable etc, but for example when I install Gallery 2 ( http://gallery.menalto.com/ ) or any other packages that require users to receive an email to complete registration , the link always starts http://192.168.0.3 ... which is very frustrating.

    I cant help feeling that the virtual hosting in apache2 isnt working properly.

    Maybe somehere can have a look at below and see whats wrong ?
    Nb - if i put www.example.com where the * are below apache hangs when i tell it to restart.
    NameVirtualHost *
    <VirtualHost *>
    	ServerAdmin example@example.com
    	ServerName www.example.com
    	ServerAlias example.com *.example.com
    	DocumentRoot /var/www/example
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/example/>
    		Options FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    		# This directive allows us to have apache2's default start page
                    # in /apache2-default/, but still have / go to the right place
                    # Commented out for Ubuntu
                    #RedirectMatch ^/$ /apache2-default/
    	</Directory>
    
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /var/log/apache2/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /var/log/apache2/access.log combined
    	ServerSignature On
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
    </VirtualHost>
    

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Nb - if i put www.example.com where the * are below apache hangs when i tell it to restart.
    Your ubuntu server needs to be able to resolve the web address to itself.
    Try adding an entry in /etc/hosts for the website name:

    192.168.0.3 www.example.com

    and restart apache.

    Take a look for the "Listen" directive, probably in ports.conf
    and see if it has your IP address listed there.
    Probably better if it doesn't.

    When you installed Gallery, did you give it example.com[/b] as its base address, or
    did you give it the IP address?
    It's the application that is generating the URL,
    and it needs to know that the sitename should be
    www.example.com or whatever. Check its settings file.

    NiallB


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 15,544 ✭✭✭✭Supercell


    Huge thanks Niall, put it into the hosts file and all works grand.
    Can I put multiple sites into there all resolving to the same IP or will this mess things up ?

    Have a weather station?, why not join the Ireland Weather Network - http://irelandweather.eu/



  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Yes you can.
    Apache will take care of serving the right files
    based on the name used.

    NiallB


Advertisement