installing apache on xubuntu

dotKer

Member
Joined
Aug 16, 2019
Messages
69
Reaction score
14
Credits
0
I am new in linux and installed xubuntu some days ago.
Now I like to install apache on the xubuntu.

(Q1) Where should I download the apache installation file which can install the apache on the xubuntu.
 


I am at https://tutorials.ubuntu.com/tutorial/install-and-configure-apache#2

Code:
cd /var/www/gci/
nano index.html
I did the above.

A new terminal shown, it says GNU nano 2.9.3 index.html on the top.
I Pasted the following code in the index.html file of the new terminal.
Code:
<html>
<head>
  <title> Ubuntu rocks! </title>
</head>
<body>
  <p> I'm running this website on an Ubuntu Server server!
</body>
</html>

(Q1) How can I save the contents which I pasted in the new terminal?
(I don't know how I save the change).

(Q2) What should I enter in the address box of the browser for browsing ?
I try to enter "localhost/gci/" in the address box of a browser but it says "404 Not Found".

(Q3) What does "nano" mean?
I know "CD" means "Change Directory".
 
Before you do anything to any file, you should back it up first. So in Terminal, type, cp /var/www/html/index.html /var/www/html/index.original. CP is the copy command. For everything I tell you here, you don't need to do the CD first, but you can if you want.

Nano is a text editor. sudo is a permissions elevator. The Index.html file can only be modified with root privileges. So you type, sudo nano /var/www/html/index.html, in terminal to edit the index.html file in that directory. After you do your edit the file, hit control-x, y, then hit enter. Control-x tells it you want to exit. Y tells it you want to save, and the enter at the end says to save it to the existing file name.

You get to your local website with just http://localhost

If you're going to be making your own website, you might want to get a book, or find one online.
 
now I understand Nano is a text editor.
after I write somthing in the Nano editor, I hit control-x, y, then hit enter.
then It says
"index.html write error : approve denied"(=this is translation from my mother tongue to English)

if I enter http://localhost in the address bar of the browser,
it still says "Apache2 Ubuntu Default Page and blah blah ..."

I like to change it
from "Apache2 Ubuntu Default Page and blah blah ..."
to "I'm running this website on an Ubuntu Server server"

how can I change the browsing result of http://localhost
from "Apache2 Ubuntu Default Page and blah blah ..."
to "I'm running this website on an Ubuntu Server server"?
 
Last edited:
haven't recently used xampp nor apache for some time since there are much easier ways of developing web sites on localhost. With xampp you have to be careful since their is the landing page for control where there are links to phpmyadmin and an index for an web, but my approach would be to take a good look at whats displayed on the web root landing page. then go on and open files at web root with a text editor. when you open up a file that has something like <h1> welcome to default </h1> then you know thats the one being recognized. Edit that a little and re-fresh , if you see chnages then thats your starting point
 
when you started nano, did you start the command out with sudo?

The Index.html file can only be modified with root privileges. So you type, sudo nano /var/www/html/index.html, in terminal to edit the index.html file
 

Members online


Latest posts

Top