0

I have an Ubuntu 16.04 server running LAMP, a fully built website on it, and a domain purchased from GoDaddy.

This is the first time I've tried hosting a website publicly, so I'm hazy on the details concerning domains. What do I need to do on GoDaddy so that when I type mysite.com into a browser, it serves up the mysite.com/public/index.php page from my server?

If this is a matter of creating an A Record (which is what some Googling around has suggested might be applicable here), some guidance in what setting to alter and what values to enter in would be much appreciated.

2
  • 2
    There are many reasons to not do this. Do you have a static IP address? Plenty of upload speed? Know how to properly secure your server (you will be shocked at the number of intrusion attempts) etc etc etc
    – Steve
    Commented Sep 9, 2017 at 21:51
  • To repeat what has already said, you do not want to try and run a sever on your home network unless you really know what you are doing. Hackers will get into your network in the blink of an eye and really ruin your day in a hurry.
    – closetnoc
    Commented Sep 10, 2017 at 3:07

1 Answer 1

0

Firstly you NEED a static IP address. Try browsing to that IP address from a remote computer (or phone) to ensure that your LAMP setup is working.

Note: you may need to setup port forwarding on your router and open port 80 for HTTP traffic.

Once that's all ok you can go to your GoDaddy control panel domain DNS settings and set an A Record or nameserver as your Static IP address. Good luck.

3
  • If you don't have a static IP, look at something like DynDNS.
    – TomC
    Commented Sep 9, 2017 at 21:33
  • "...or nameserver" - Only if you have a DNS server running locally, in which case you'll still need to set an A record in the local DNS zone.
    – DocRoot
    Commented Sep 9, 2017 at 22:04
  • Never run a public DNS server on an at home network! It is a severe security risk if you do not know what you are doing.
    – closetnoc
    Commented Sep 10, 2017 at 3:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.