LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-28-2022, 01:14 AM   #16
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 351

Rep: Reputation: 60

Perhaps this link could help you : https://unix.stackexchange.com/quest...s-enabled-conf
 
Old 11-28-2022, 01:23 AM   #17
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 351

Rep: Reputation: 60
It states you are having </VirtualHost> without matching <VirtualHost> section.

Your site goes between those two, like this :

<VirtualHost>
DocumentRoot /path/to/site/docs
etc
etc
.
.
</VirtualHost>
 
Old 11-28-2022, 01:42 AM   #18
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Yes I see what I've done or haven't done. So much to ingest at this stage.
I'll go check it all and unravel what I've raveled :-) and look at that link then check back after I've done it in a day or two.
I appreciate your help and time. Thank you
 
Old 11-28-2022, 01:45 AM   #19
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 351

Rep: Reputation: 60
Most welcome.
 
Old 11-28-2022, 02:17 AM   #20
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Well I did have some time so think maybe I've cleaned it up..

Quote:
sudo netstat -tulpen |grep 80
tcp 0 0 127.0.0.1:44725 0.0.0.0:* LISTEN 1000 34803 1404/rygel
tcp6 0 0 :::80 :::* LISTEN 0 377490 16667/apache2
udp 0 0 239.255.255.250:1900 0.0.0.0:* 1000 36280 1404/rygel
Quote:
sudo apachectl configtest
[Mon Nov 28 19:18:21.367063 2022] [core:error] [pid 16882:tid 139759424044096] (EAI 2)Name or service not known: AH00547: Could not resolve host name *80 -- ignoring!
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Let me go check all the ServerName entries in the conf files.

Last edited by ozstar; 11-28-2022 at 02:19 AM.
 
Old 11-28-2022, 02:39 AM   #21
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Okay I've got it down to this.. but still trying..

Quote:
/etc/apache2/sites-available$ sudo apachectl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
The only ServerName that is there, is a domain .com name we own which is pointed to our IP via A Zone at the registry.

I'm not sure what the message refers to.

Last edited by ozstar; 11-28-2022 at 02:49 AM. Reason: Adding
 
Old 11-28-2022, 03:05 AM   #22
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 351

Rep: Reputation: 60
You can set ServerName to any dummy name or set it to localhost.
say , ServerName www.example.com
 
1 members found this post helpful.
Old 11-28-2022, 02:59 PM   #23
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Okay I see my 80 and 443 are open and I am getting through to the server to the 'net with http
But getting a Forbidden 403 page.
What could cause this ?

I am also looking at changing but to 443 https andcDMZ to help with security plus put it all in a VM.
 
Old 11-28-2022, 03:33 PM   #24
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
Probably permissions. I just put a txt file like data.txt at the document root with "hello world" in it.

Then try and read it (and check the httpd logs).
 
Old 11-28-2022, 05:33 PM   #25
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
I see this in my error logs..

Quote:
[Tue Nov 29 09:44:10.127646 2022] [access_compat:error] [pid 52158:tid 140599034373888] [client 192.168.20.1:60620] AH01797: client denied by server configuration: /var/www/mysite/data.txt
[Tue Nov 29 09:56:09.870355 2022] [access_compat:error] [pid 52158:tid 140598992410368] [client 192.168.20.1:50074] AH01797: client denied by server configuration: /var/www/mysite/
[Tue Nov 29 09:56:10.222080 2022] [access_compat:error] [pid 52158:tid 140598505895680] [client 192.168.20.1:50074] AH01797: client denied by server configuration: /var/www/mysite/favicon.ico, referer: http://www.mysite.com/
EDIT

More info in case it can help.

When I place this url in browser localhost/mysite/
I get this..

Quote:
Not Found
The requested URL was not found on this server.

Apache/2.4.41 (Ubuntu) Server at localhost Port 80
If I just use localhost then I do get the apache index page.

Last edited by ozstar; 11-28-2022 at 05:43 PM.
 
Old 11-28-2022, 08:08 PM   #26
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
You probably have some "Allow from" directives that allow localhost but not all networks for DocumentRoot. Have you done any Apache setup before?
 
Old 11-28-2022, 09:22 PM   #27
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Yes years ago in LAMP much the same as this, but the old memory is a bit shaky on some things until its boosted again, which is what is happening as we speak :-)
I'll check those conf files again.
Many thanks
 
Old 11-28-2022, 09:47 PM   #28
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
Yes you were correct it was in the conf file and it does now resolve at the index page as it should. God work thanks :-)

Not understanding too much of what it meant I just copied what I was told on an apache site. I took a look again and found this set. Is this okay ?

Quote:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>

<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>

<Directory /var/www/mysite>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>

Last edited by ozstar; 11-29-2022 at 01:58 AM.
 
Old 12-01-2022, 07:22 PM   #29
ozstar
Member
 
Registered: Oct 2003
Location: Sydney OZ
Distribution: Ubuntu 20.04LTS, Zorin 16.2 Pro
Posts: 143

Original Poster
Rep: Reputation: 15
All working now in a VM. At last ! :-)
 
Old 12-01-2022, 09:27 PM   #30
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
One thing that did catch my attention is you using 127.0.1.1. Assuming this is for localhost, that's almost always 127.0.0.1 .
If it works for you, fine, but be aware that almost every article you see for 'localhost' will use 127.0.0.1. You may end up with an inconsistency.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 02:48 AM
Slackware 12.1 with Static IP behind DHCP router resolves DNS verrrry slow. Help? skelter42 Slackware 11 09-25-2009 08:48 PM
DNS resolves quickly but lynx extremely slow yichun Debian 2 07-01-2004 09:08 PM
IP resolves, not others belorion Linux - Networking 3 06-30-2004 02:39 AM
IPChains hostname has multiple IPs is resolves to? Ionized Linux - Networking 1 07-30-2002 01:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration