Apache 2.4 doesn't read configuration files

Kernels & Hardware, configuring network, installing services

Apache 2.4 doesn't read configuration files

Postby syscon » 2020-10-29 23:21

The apache 2.4 doesn't read configuration files.
In apache2.conf I have:
Code: Select all
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf


So it should read read every *config file in sites-enabled/
In that directory I have:
Code: Select all
ll sites-enabled/
total 4
lrwxrwxrwx 1 root root   35 Oct 27 21:15 000-default.conf -> ../sites-available/000-default.conf
-rw-r--r-- 1 root root 3420 Oct 29 18:03 vhosts.conf


vhosts.conf - define my web-site, but I commented everything out in that file and restarted apache:
/etc/init.d/apache2 restart

And I can still display my web page.
How is it possible???
syscon
 
Posts: 13
Joined: 2020-10-24 18:35

Re: Apache 2.4 doesn't read configuration files

Postby 5ive » 2020-12-18 04:38

Since, the file 000-default.conf file will be read first. That file would be loaded before vhosts.conf
Apache when installed will be setup to point at an example web page. Perhaps, you copied over that file?

nano 000-default.conf and see what is inside it!
I do not take responsibility if you ruin your system.
Beginner’s Guide
5ive
 
Posts: 4
Joined: 2020-12-13 21:10

Re: Apache 2.4 doesn't read configuration files

Postby thomas-gatry » 2021-02-01 09:24

Hi guys!
After upgrading from 9 to 10
Apache stopped working :(

Сonfigurations may have been reset
What needs to be checked?
thomas-gatry
 
Posts: 2
Joined: 2021-02-01 09:13

Re: Apache 2.4 doesn't read configuration files

Postby 5ive » 2021-02-03 02:07

I would double check configuration files. Debian will ask what you want to do with an altered config file while upgrading.
It will ask to keep your original or install a new one.

More importantly, what messages are in the log files? I believe they should be located in /var/log/apache2/ or /var/log/httpd/
Otherwise ls /var/log/ and you should find them.
I no longer run Apache, so I don't know the exact location.

1. You can also in one terminal:
sudo journalctl -f -u apache2

This will follow the logging of the service apache2
2. In another terminal:
sudo systemctl restart apache2

This will restart your Apache 2 service, which should output logging into your first terminal.

You might see an error or be able to get better help supplying an error message to someone here.
I do not take responsibility if you ruin your system.
Beginner’s Guide
5ive
 
Posts: 4
Joined: 2020-12-13 21:10


Return to System configuration

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable