LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   have my own server (http://www.linuxquestions.org/questions/linux-security-4/have-my-own-server-4175441604/)

faizlo 12-15-2012 05:15 PM

have my own server
 
Hi All,

Well, this is my first time to try to have a server for a website.

Here is what I want to do:
I've already bought a domain name for myself; now what I want is to host my website on my own (Linux, of course) box using this domain that I just bought - how may I do this?
I want to test my website and test any- and everything I do before it becomes official.
Any link or document will be very appreciated.

thanks, faizlo.

frieza 12-15-2012 05:37 PM

it depends, if you are using a standard 'residential' service internet connection, than chances are you also have a dynamic IP address for your internet connection, which is problematic at best for a real domain, you would have to talk to your ISP and acquire a static IP for your internet connection, which usually costs extra $$$$, as well as some ISPs block inbound port 80.
once you establish that, then you configure your router to forward port 80 to your server.

unfortunately, the easiest way is not to use your own PC as a server, but to pay for hosting on an actual website hosting provider such as Godaddy, either way you are going to have to pony up some dough.

faizlo 12-16-2012 12:28 PM

Hi Frieza

Thank you for your reply. So you say there is only one option, which is to buy some hosting from a hosting server.
Well, if I can have a static IP from my ISP, what else should I do?

~hatim

notsure 12-16-2012 01:28 PM

Well, depending on how important your site is.... My IP addresses (multiple residential locations) have not changed in about 2 years or more.

or look into dynamicDNS

nobuntu 12-16-2012 01:49 PM

Quote:

Originally Posted by notsure (Post 4850509)
Well, depending on how important your site is.... My IP addresses (multiple residential locations) have not changed in about 2 years or more.

or look into dynamicDNS

My IP address seems to only change when I power-cycle my modem.

If you have a dynamic IP and are using DNS services from freedns.afraid.org, they have some Dynamic DNS clients worth looking into.

frieza 12-16-2012 03:06 PM

Quote:

Originally Posted by faizlo (Post 4850485)
Hi Frieza

Thank you for your reply. So you say there is only one option, which is to buy some hosting from a hosting server.
Well, if I can have a static IP from my ISP, what else should I do?

~hatim

then you configure your server with a static ip inside your local IP set, point port 80 at it, (or whatever service port you need for your server) with your router, and then point the A record of your domain at your static public IP provided by your ISP.

faizlo 12-19-2012 02:55 PM

Hi all,

I have been reading about this for sometime. I learned a lot, but I still need a tutorial or some guide to lead me through the process of configuring my box to run as a server. Any help?

Wim Sturkenboom 12-19-2012 10:19 PM

Have you installed a LAMP stack? That is, apache, mysql and php? If not (and assuming this is for ubuntu or one of its derivates).

Code:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lamp-server^

The first command updates the list of packages, the second command updates your system; these two do the same as what the update manager does). The third one is the one that you're actually looking for.

'sudo' will ask you for your normal user password.

While the latter command installs mysql, you will be asked to provide a password for the mysql root user that you want to use; provide one and don't forget it.

For remote access (uploading files and configuration), you need a secure way of accessing your system; install ssh-server. If you need email functionality from your website, you need to install a mail server.

An alternative route is to install tasksel (see e.g. http://www.unixmen.com/install-lamp-...ick-meerkat/); it provides you with a UI to select packages that you want to install.

Next do finetuning on the server.

Next read up on securing your server!

And lastly start writing your website.

faizlo 12-20-2012 05:27 PM

I have all these installed on my box, and they are running fine.
All I am interested in now is to configure my box to work as a server for my new domain...Any guide?

Ser Olmy 12-20-2012 05:50 PM

Your question is somewhat ambiguous, and it's difficult to point you in the right direction without knowing exactly what you're asking for.

If you want to know how to configure the Apache web server to serve web pages for a particular domain, you should consult the Apache documentation (look for "virtual server").

However, your question could also be interpreted as a query regarding domain registration, DNS configuration, port forwarding, HTML design and perhaps a few other topics. Unsurprisingly, no single guide or document covers everything.

faizlo 12-20-2012 08:08 PM

OK, and sorry if I am not clear enough (which is part of the problem)
I have bought a domain name (example.com) from a registered domain name registrar. All I want now is to use my box as the hosting server for my web site. I am experimenting a new web site and I want to be able to do everything on my own. hosting it on my box is the goal of this post.
I do have everything required to host web pages. MySQL, PHP, JS, Apache are all installed and running very well. I will have to worry about security once I can set everything up right and my domain can be reached from any place via the Internet.

I hope I could explain it better this time.

Thanks again for your patience.

frankbell 12-20-2012 09:34 PM

no-ip.com has some good tutorials on this topic.

Full disclosure: I have no connection with no-ip.com other than having been a satisfied customer for several years before I moved to my current location.

One thing you should check is your ISP's terms of service. Some are more hostile to self-hosting than others; some block port 80 and will actively try to shut you down and turn you off if they catch you putting a public-facing server on-line. One reason I no longer self-host is that my current ISP falls into that category (the other is that my site outgrew the capabilities of my home server).

Noway2 12-21-2012 07:55 AM

Quote:

One reason I no longer self-host is that my current ISP falls into that category
Let me guess, Comcast in the Richmond area? I more or less lived in Ashland for about 3 years and they were downright hostile to anything outside of basic browsing and would clamp your speed down to as low as 256 bytes/sec.
P.S. When I was still there, I thought about seeking out your LUG, but you were a little too eastward for it to be convenient.

schneidz 12-21-2012 08:06 AM

Quote:

Originally Posted by frieza (Post 4850080)
it depends, if you are using a standard 'residential' service internet connection, than chances are you also have a dynamic IP address for your internet connection, which is problematic at best for a real domain, you would have to talk to your ISP and acquire a static IP for your internet connection, which usually costs extra $$$$, as well as some ISPs block inbound port 80.

i use dyndns.com to get around that problem.

schneidz 12-21-2012 08:09 AM

Quote:

Originally Posted by notsure (Post 4850509)
Well, depending on how important your site is.... My IP addresses (multiple residential locations) have not changed in about 2 years or more.

or look into dynamicDNS

my experience is that my ip stays static until there is a black out or i have to unplug my internet transceiver for some reason.


All times are GMT -5. The time now is 04:33 AM.