How to create a WWW website using Apache
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
|
show 2 more comments
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
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
Jan 27 at 18:31
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
Jan 27 at 18:36
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
Jan 27 at 18:38
2
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
3
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41
|
show 2 more comments
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
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
16.04 apache2 internet webserver www
edited Jan 27 at 20:11
vidarlo
10.5k52751
10.5k52751
asked Jan 27 at 18:27
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
Jan 27 at 18:31
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
Jan 27 at 18:36
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
Jan 27 at 18:38
2
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
3
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41
|
show 2 more comments
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
Jan 27 at 18:31
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
Jan 27 at 18:36
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
Jan 27 at 18:38
2
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
3
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41
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
Jan 27 at 18:31
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
Jan 27 at 18:31
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
Jan 27 at 18:36
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
Jan 27 at 18:36
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
Jan 27 at 18:38
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
Jan 27 at 18:38
2
2
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
3
3
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41
|
show 2 more comments
1 Answer
1
active
oldest
votes
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
You will need a public IP address from your internet service provider (ask your ISP about the costs)
You will need an unlimited data plan from your ISP (again ask your ISP about price)
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.
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.
- 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.
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
Jan 27 at 20:05
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
You will need a public IP address from your internet service provider (ask your ISP about the costs)
You will need an unlimited data plan from your ISP (again ask your ISP about price)
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.
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.
- 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.
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
Jan 27 at 20:05
add a comment |
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
You will need a public IP address from your internet service provider (ask your ISP about the costs)
You will need an unlimited data plan from your ISP (again ask your ISP about price)
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.
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.
- 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.
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
Jan 27 at 20:05
add a comment |
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
You will need a public IP address from your internet service provider (ask your ISP about the costs)
You will need an unlimited data plan from your ISP (again ask your ISP about price)
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.
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.
- 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.
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
You will need a public IP address from your internet service provider (ask your ISP about the costs)
You will need an unlimited data plan from your ISP (again ask your ISP about price)
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.
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.
- 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.
edited Jan 27 at 20:07
answered Jan 27 at 18:59
kukulokukulo
1,435418
1,435418
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
Jan 27 at 20:05
add a comment |
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
Jan 27 at 20:05
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
Jan 27 at 20:05
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
Jan 27 at 20:05
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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
Jan 27 at 18:31
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
Jan 27 at 18:36
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
Jan 27 at 18:38
2
Unless you have administrative privileges of the router, you probably can't. Please read the manual of the device.
– vidarlo
Jan 27 at 18:48
3
Possible duplicate of How to set a domain to ip address?
– pa4080
Jan 29 at 9:41