logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Installing Apache in Ubuntu
Author
Sam Hobbs



Joined: 06 Dec 2021
Posts: 6
Location: USA, California

PostPosted: Tue 07 Dec '21 1:15    Post subject: Installing Apache in Ubuntu Reply with quote

I have installed Ubuntu in a portable drive.

Then I installed Apache using Install and Configure Apache | Ubuntu. I was able to rename the index.html in /var/www/html and create my own index.html and it is rendered when I browse to localhost.

Then on page three it explains how to create a separate website. The instructions use gci as in /var/www/gci/ but it says we can use any name so I am using starter. When I browse to http://starter.example.com it cannot find the site; says:

Quote:
Hmm. We’re having trouble finding that site.
We can’t connect to the server at starter.example.com.


I think the permissions are correct; the following command produces the result shown.

Code:
ls -l /var/www/starter/index.html
-rw-rw-r-- 1 sam sam 214 Dec  4 16:04 /var/www/starter/index.html


I think the site is available; the following command produces the result shown (other lines are not shown).

Code:
apache2ctl -S
port 80 namevhost starter.example.com (/etc/apache2/sites-enabled/starter.conf:1)


Also see my /etc/apache2/sites-available/starter.conf.

What else do I need to look at to diagnose the problem?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 07 Dec '21 11:09    Post subject: Reply with quote

Either your web server isn't running or the domain can't be resolved via DNS.
Back to top
Sam Hobbs



Joined: 06 Dec 2021
Posts: 6
Location: USA, California

PostPosted: Tue 07 Dec '21 22:34    Post subject: Reply with quote

I can see the pages in /var/www/html when I browse to localhost so I assume that means the web server is running. Apache is running.

The instructions explain how to create a local website. I see nothing about updating DNS. Where in the instructions does it say how to update DNS for this? As far as I understand things, DNS is not relevant to local sites.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 08 Dec '21 10:09    Post subject: Reply with quote

I see.

If you only what that for testing in your local network then you can modify the hosts file on the client you from that you access the server.

Windows, Browser -> Linux, httpd Apache

C:\Windows\System32\drivers\etc\hosts
on Linux it is /etc/hosts

example

Code:

192.168.100.23    starter.example.com
Back to top
Sam Hobbs



Joined: 06 Dec 2021
Posts: 6
Location: USA, California

PostPosted: Wed 08 Dec '21 10:55    Post subject: Reply with quote

Thank you. That makes sense. So probably the instructions (tutorial or whatever) are lacking a bit.

I understand about host files.
Back to top
Sam Hobbs



Joined: 06 Dec 2021
Posts: 6
Location: USA, California

PostPosted: Sun 09 Jan '22 12:24    Post subject: Reply with quote

After posting this I figured out how to address local websites by port only; see Addressing local website by port only. That works better for me.
Back to top


Reply to topic   Topic: Installing Apache in Ubuntu View previous topic :: View next topic
Post new topic   Forum Index -> Apache