1

I tried asking this before but although I took all of the advised steps, nothing happened. Basically, I want to create a website like www.example.com. I can open HTML files in my browser using the LocalHost server, but I want this webpage to be visible to other users on other devices in other locations using the internet.

Here is a link to the question I asked previously

I was able to take all of the suggested steps. First, I created the file /var/www/html/index.html. Then, I created the file /etc/apache2/sites-available/index.conf with this information:

Screenshot

<VirtualHost *:80>
        ServerName test.com
        ServerAdmin info@test.com
        ServerAlias www.test.com
        DocumentRoot /var/www/html

        <Directory /var/www/html>
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Then I ran this command: sudo a2ensite index.conf

And then I ran this command: sudo systemctl restart apache2

However, nothing happened after that. I have tried this many times. Does anyone have any ideas on what to do?

vidarlo
  • 23,497

1 Answers1

2
  1. You need to setup Apache properly and the server should be visible over local lan IP address, setup apache, allow incomming connection on server firewall for ports 80 and 443

  2. You will need a public IP address from your internet service provider (ask your ISP about the costs)

  3. You will need an unlimited data plan from your ISP (again ask your ISP about price)

  4. After this you will need to buy and setup a domain name - there are various providers - in the setup you will define your IP address from step 2.

  5. You will need to forward ports 80 (http) and 443 (https) to your internal web server on your router.

5.1 In order to setup https - port 443 you will need to obtain a certificate and install it on Apache.

  1. Optional step: you will need to setup local DNS for resolving the local web server requests from the lan to your local server IP address

Steps 1-5 make your website to work for outside world, step 6 makes it possible for the internal lan where the server is.

kukulo
  • 2,045
  • 12
  • 22