How to create a WWW website using Apache












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?










share|improve this question

























  • Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

    – vidarlo
    2 days ago











  • I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

    – Ruairí Másún
    2 days ago








  • 2





    Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

    – vidarlo
    2 days ago






  • 2





    Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

    – vidarlo
    2 days ago






  • 2





    Possible duplicate of How to set a domain to ip address?

    – pa4080
    21 hours ago
















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?










share|improve this question

























  • Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

    – vidarlo
    2 days ago











  • I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

    – Ruairí Másún
    2 days ago








  • 2





    Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

    – vidarlo
    2 days ago






  • 2





    Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

    – vidarlo
    2 days ago






  • 2





    Possible duplicate of How to set a domain to ip address?

    – pa4080
    21 hours ago














1












1








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?










share|improve this question
















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?







16.04 apache2 internet webserver www






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









vidarlo

10.3k52447




10.3k52447










asked 2 days ago









Ruairí MásúnRuairí Másún

145




145













  • Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

    – vidarlo
    2 days ago











  • I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

    – Ruairí Másún
    2 days ago








  • 2





    Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

    – vidarlo
    2 days ago






  • 2





    Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

    – vidarlo
    2 days ago






  • 2





    Possible duplicate of How to set a domain to ip address?

    – pa4080
    21 hours ago



















  • Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

    – vidarlo
    2 days ago











  • I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

    – Ruairí Másún
    2 days ago








  • 2





    Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

    – vidarlo
    2 days ago






  • 2





    Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

    – vidarlo
    2 days ago






  • 2





    Possible duplicate of How to set a domain to ip address?

    – pa4080
    21 hours ago

















Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

– vidarlo
2 days ago





Include the content of the configs you made in your question. Also, you say nothing happened after that. What did you expect to happen?

– vidarlo
2 days ago













I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

– Ruairí Másún
2 days ago







I wanted to be able to access the domain from a WWW address rather than 27.0.0.1 And as you can see, the information from the config isn't pasting correctly. I'll take a screenshot of it instead.

– Ruairí Másún
2 days ago






2




2





Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

– vidarlo
2 days ago





Do not take a screenshot. Paste as code instead. Do you have any functioning DNS set up? Do you have a domain name? Have you configured port forwarding from your router do your computer running Apache?

– vidarlo
2 days ago




2




2





Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

– vidarlo
2 days ago





Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.

– vidarlo
2 days ago




2




2





Possible duplicate of How to set a domain to ip address?

– pa4080
21 hours ago





Possible duplicate of How to set a domain to ip address?

– pa4080
21 hours ago










1 Answer
1






active

oldest

votes


















1















  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.






share|improve this answer


























  • Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

    – kukulo
    2 days ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113338%2fhow-to-create-a-www-website-using-apache%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1















  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.






share|improve this answer


























  • Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

    – kukulo
    2 days ago
















1















  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.






share|improve this answer


























  • Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

    – kukulo
    2 days ago














1












1








1








  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.






share|improve this answer
















  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.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered 2 days ago









kukulokukulo

1,365418




1,365418













  • Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

    – kukulo
    2 days ago



















  • Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

    – kukulo
    2 days ago

















Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

– kukulo
2 days ago





Of course. The https seems to be standard nowadays, so step 5.1 would be acquiring a certificate - in this you can use a free service Letsencrypt.

– kukulo
2 days ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113338%2fhow-to-create-a-www-website-using-apache%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

迪纳利

How did Captain America manage to do this?

南乌拉尔铁路局