How to upload HTML web pages on Apache2 web server












0














I have created some HTML files which I want to upload to the web. I am currently running the Apache2 server with my IP address. This is what I see in the browser when I enter my IP address:



Screenshot of what I see



I am able to access my HTML files using the web browser, but I want to be able to upload them to the web with ordinary web addresses so users can see them. I hope someone can guide me in the right direction.










share|improve this question
























  • Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
    – George Udosen
    Dec 30 '18 at 15:42










  • I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
    – Ruairí Másún
    Dec 30 '18 at 15:44
















0














I have created some HTML files which I want to upload to the web. I am currently running the Apache2 server with my IP address. This is what I see in the browser when I enter my IP address:



Screenshot of what I see



I am able to access my HTML files using the web browser, but I want to be able to upload them to the web with ordinary web addresses so users can see them. I hope someone can guide me in the right direction.










share|improve this question
























  • Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
    – George Udosen
    Dec 30 '18 at 15:42










  • I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
    – Ruairí Másún
    Dec 30 '18 at 15:44














0












0








0







I have created some HTML files which I want to upload to the web. I am currently running the Apache2 server with my IP address. This is what I see in the browser when I enter my IP address:



Screenshot of what I see



I am able to access my HTML files using the web browser, but I want to be able to upload them to the web with ordinary web addresses so users can see them. I hope someone can guide me in the right direction.










share|improve this question















I have created some HTML files which I want to upload to the web. I am currently running the Apache2 server with my IP address. This is what I see in the browser when I enter my IP address:



Screenshot of what I see



I am able to access my HTML files using the web browser, but I want to be able to upload them to the web with ordinary web addresses so users can see them. I hope someone can guide me in the right direction.







16.04 networking server apache2 html






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 30 '18 at 15:39









George Udosen

20k94367




20k94367










asked Dec 30 '18 at 15:30









Ruairí Másún

95




95












  • Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
    – George Udosen
    Dec 30 '18 at 15:42










  • I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
    – Ruairí Másún
    Dec 30 '18 at 15:44


















  • Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
    – George Udosen
    Dec 30 '18 at 15:42










  • I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
    – Ruairí Másún
    Dec 30 '18 at 15:44
















Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
– George Udosen
Dec 30 '18 at 15:42




Your apache isn't setup well, and what do you mean by "I am able to access my HTML"?
– George Udosen
Dec 30 '18 at 15:42












I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
– Ruairí Másún
Dec 30 '18 at 15:44




I am able to open my HTML files using the web browser, by opening the files in the browser from my file manager. How would you suggest I set up the apache?
– Ruairí Másún
Dec 30 '18 at 15:44










1 Answer
1






active

oldest

votes


















0














When you type in your IP address or localhost or 127.0.0.1 in a URL of any web browser, it always searches for an index.php or an index.html to open. If it doesn't exist, it just shows files on that folder.




What you see here is your screenshot is the index.html file located in the directory /var/www/html/




I believe you're hosting a website on your local system. Since you're running Apache2 as your Web Server. All your HTML files are needed to be placed within the directory /var/www/html/.



All you need to do the following:




  • Delete or rename that index.html in that directory. (You'll probably have to do it in sudo mode through terminal, else just give yourself access to read/write/execute all files within the html directory)

  • Now place your desired HTML file which is to be your "Homepage" and make sure it is named as index.html or index.php

  • That's it, you're good to go !


Now enter your IP address in your Browser URL, and you can see your HTML file.




A few additional tips:




  • Make sure your Apache2 is running before you can view anything on your browser. If youre not sure, just type this command in the Terminal: sudo /etc/init.d/apache2 restart

  • Make sure you, (the user) has read/write/execute privileges on all files and folders in the /var/www/html folder.







share|improve this answer








New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
    – Ruairí Másún
    Dec 30 '18 at 16:21










  • Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
    – gammaSpeck
    Dec 30 '18 at 17:08












  • Thanks. I was able to remove it simply using sudo rm.
    – Ruairí Másún
    Dec 30 '18 at 17:09










  • That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
    – gammaSpeck
    Dec 30 '18 at 17:12











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%2f1105619%2fhow-to-upload-html-web-pages-on-apache2-web-server%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









0














When you type in your IP address or localhost or 127.0.0.1 in a URL of any web browser, it always searches for an index.php or an index.html to open. If it doesn't exist, it just shows files on that folder.




What you see here is your screenshot is the index.html file located in the directory /var/www/html/




I believe you're hosting a website on your local system. Since you're running Apache2 as your Web Server. All your HTML files are needed to be placed within the directory /var/www/html/.



All you need to do the following:




  • Delete or rename that index.html in that directory. (You'll probably have to do it in sudo mode through terminal, else just give yourself access to read/write/execute all files within the html directory)

  • Now place your desired HTML file which is to be your "Homepage" and make sure it is named as index.html or index.php

  • That's it, you're good to go !


Now enter your IP address in your Browser URL, and you can see your HTML file.




A few additional tips:




  • Make sure your Apache2 is running before you can view anything on your browser. If youre not sure, just type this command in the Terminal: sudo /etc/init.d/apache2 restart

  • Make sure you, (the user) has read/write/execute privileges on all files and folders in the /var/www/html folder.







share|improve this answer








New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
    – Ruairí Másún
    Dec 30 '18 at 16:21










  • Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
    – gammaSpeck
    Dec 30 '18 at 17:08












  • Thanks. I was able to remove it simply using sudo rm.
    – Ruairí Másún
    Dec 30 '18 at 17:09










  • That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
    – gammaSpeck
    Dec 30 '18 at 17:12
















0














When you type in your IP address or localhost or 127.0.0.1 in a URL of any web browser, it always searches for an index.php or an index.html to open. If it doesn't exist, it just shows files on that folder.




What you see here is your screenshot is the index.html file located in the directory /var/www/html/




I believe you're hosting a website on your local system. Since you're running Apache2 as your Web Server. All your HTML files are needed to be placed within the directory /var/www/html/.



All you need to do the following:




  • Delete or rename that index.html in that directory. (You'll probably have to do it in sudo mode through terminal, else just give yourself access to read/write/execute all files within the html directory)

  • Now place your desired HTML file which is to be your "Homepage" and make sure it is named as index.html or index.php

  • That's it, you're good to go !


Now enter your IP address in your Browser URL, and you can see your HTML file.




A few additional tips:




  • Make sure your Apache2 is running before you can view anything on your browser. If youre not sure, just type this command in the Terminal: sudo /etc/init.d/apache2 restart

  • Make sure you, (the user) has read/write/execute privileges on all files and folders in the /var/www/html folder.







share|improve this answer








New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
    – Ruairí Másún
    Dec 30 '18 at 16:21










  • Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
    – gammaSpeck
    Dec 30 '18 at 17:08












  • Thanks. I was able to remove it simply using sudo rm.
    – Ruairí Másún
    Dec 30 '18 at 17:09










  • That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
    – gammaSpeck
    Dec 30 '18 at 17:12














0












0








0






When you type in your IP address or localhost or 127.0.0.1 in a URL of any web browser, it always searches for an index.php or an index.html to open. If it doesn't exist, it just shows files on that folder.




What you see here is your screenshot is the index.html file located in the directory /var/www/html/




I believe you're hosting a website on your local system. Since you're running Apache2 as your Web Server. All your HTML files are needed to be placed within the directory /var/www/html/.



All you need to do the following:




  • Delete or rename that index.html in that directory. (You'll probably have to do it in sudo mode through terminal, else just give yourself access to read/write/execute all files within the html directory)

  • Now place your desired HTML file which is to be your "Homepage" and make sure it is named as index.html or index.php

  • That's it, you're good to go !


Now enter your IP address in your Browser URL, and you can see your HTML file.




A few additional tips:




  • Make sure your Apache2 is running before you can view anything on your browser. If youre not sure, just type this command in the Terminal: sudo /etc/init.d/apache2 restart

  • Make sure you, (the user) has read/write/execute privileges on all files and folders in the /var/www/html folder.







share|improve this answer








New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









When you type in your IP address or localhost or 127.0.0.1 in a URL of any web browser, it always searches for an index.php or an index.html to open. If it doesn't exist, it just shows files on that folder.




What you see here is your screenshot is the index.html file located in the directory /var/www/html/




I believe you're hosting a website on your local system. Since you're running Apache2 as your Web Server. All your HTML files are needed to be placed within the directory /var/www/html/.



All you need to do the following:




  • Delete or rename that index.html in that directory. (You'll probably have to do it in sudo mode through terminal, else just give yourself access to read/write/execute all files within the html directory)

  • Now place your desired HTML file which is to be your "Homepage" and make sure it is named as index.html or index.php

  • That's it, you're good to go !


Now enter your IP address in your Browser URL, and you can see your HTML file.




A few additional tips:




  • Make sure your Apache2 is running before you can view anything on your browser. If youre not sure, just type this command in the Terminal: sudo /etc/init.d/apache2 restart

  • Make sure you, (the user) has read/write/execute privileges on all files and folders in the /var/www/html folder.








share|improve this answer








New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered Dec 30 '18 at 16:16









gammaSpeck

11




11




New contributor




gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






gammaSpeck is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
    – Ruairí Másún
    Dec 30 '18 at 16:21










  • Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
    – gammaSpeck
    Dec 30 '18 at 17:08












  • Thanks. I was able to remove it simply using sudo rm.
    – Ruairí Másún
    Dec 30 '18 at 17:09










  • That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
    – gammaSpeck
    Dec 30 '18 at 17:12


















  • Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
    – Ruairí Másún
    Dec 30 '18 at 16:21










  • Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
    – gammaSpeck
    Dec 30 '18 at 17:08












  • Thanks. I was able to remove it simply using sudo rm.
    – Ruairí Másún
    Dec 30 '18 at 17:09










  • That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
    – gammaSpeck
    Dec 30 '18 at 17:12
















Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
– Ruairí Másún
Dec 30 '18 at 16:21




Thanks for that. How do I delete the index.html file using the Terminal? I tried to delete it normally and the option was greyed out.
– Ruairí Másún
Dec 30 '18 at 16:21












Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
– gammaSpeck
Dec 30 '18 at 17:08






Follow these steps: 1-Open your directory location /var/www/html 2-Right click in the directory, and click on "Open In Terminal" 3-Type in the command: sudo chmod 777 * (You now can delete and do anything you like within that folder) 4-Now add your new index.html or index.php inside
– gammaSpeck
Dec 30 '18 at 17:08














Thanks. I was able to remove it simply using sudo rm.
– Ruairí Másún
Dec 30 '18 at 17:09




Thanks. I was able to remove it simply using sudo rm.
– Ruairí Másún
Dec 30 '18 at 17:09












That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
– gammaSpeck
Dec 30 '18 at 17:12




That's an easy way out. You'll run into issues later as you wont be able to add new files, unless you give yourself complete permissions to that folder and all other subfolders. I suggest you change the permissions to that folder, to have a smoother time testing your Website.
– gammaSpeck
Dec 30 '18 at 17:12


















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f1105619%2fhow-to-upload-html-web-pages-on-apache2-web-server%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

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b