Imagine that you want to host your website from your own home or office. Learn how to set up a Linux web server in this tutorial. This tutorial uses Linux Mint 9, but the steps are the same on any recent distribution of Linux.
The first thing you need to do is give your server a static IP address. After setting a static IP address, you will need to download and install the necessary software. Run the following commands in a terminal:
Mysql-server libapache2-mod-php5 Apache2 php5-mysql
During the installation process, you will be prompted for a root password. Select a complex password that you will not forget! Type the server’s address (e.g., 192.168.1.3) into your web browser after an installation, and you should see the message IT WORKS! If the message appears, the server is up and running. You can now start adding content to it. As a default, Apache stores its web data in the /var/www folder, but it is not writeable. Launch a terminal and type:
Lets Know: How to set up linux web server
Passwords must be entered when prompted. Right-click on www in /var. Then click on create and delete files folders for yourself if you are the owner or group.
Downloading some FTP software is the next step. Percy personal recommendation islezilLaunch a terminal by typing:type:
sudo apt-get install Filezilla
Connect to your existing web server and copy your files into /var/www once the installation has been completed.
I congratulate you. It will not be visible from the internet until your website is hosted on your new server. A router acts as a firewall, so to make your website visible, you need to open up port 80 on your router and redirect HTTP packets to your server’s new address. To learn more about port forwarding, you can visit Port Forward.com.
A static IP address for your router will also need to be obtained from your ISP. In the absence of this, you will not access your site every time your IP address changes.
And that’s all there is to it! You now have a basic webserver to host your website.