Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just did a dist upgrade, from Ubuntu 20.04 to 22.04.
Now apache2 won't start, I can't test my own, home-made webpages on my localhost! Could you please give me some tips?
line 146 of apache2.conf is: IncludeOptional mods-enabled/*.load
php is installed and the newest version.
Quote:
pedro@pedro-512ssd:~$ php --version
PHP 8.1.2 (cli) (built: Aug 8 2022 07:28:23) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
pedro@pedro-512ssd:~$
In /usr/lib/apache2/modules/ I have libphp8.1.so
Quote:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-09-26 15:16:32 CST; 1min 56s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 948 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 45ms
9月 26 15:16:32 pedro-512ssd systemd[1]: Starting The Apache HTTP Server...
9月 26 15:16:32 pedro-512ssd apachectl[984]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.4.load: Cannot load /usr/lib/apache2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
Cannot load /usr/lib/apa>che2/modules/libphp7.4.so into server: /usr/lib/apache2/modules/libphp7.4.so: cannot open shared object file: No such file or directory
9月 26 15:16:32 pedro-512ssd apachectl[948]: Action 'start' failed.
9月 26 15:16:32 pedro-512ssd apachectl[948]: The Apache error log may have more information.
9月 26 15:16:32 pedro-512ssd systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
9月 26 15:16:32 pedro-512ssd systemd[1]: apache2.service: Failed with result 'exit-code'.
9月 26 15:16:32 pedro-512ssd systemd[1]: Failed to start The Apache HTTP Server.
There are some syntax errors in the configuration file. The line numbers in question are given in the error message which you have posted. If the files themselves have not changed, then check to ensure that the relevant Apache2 modules are installed and active.
The utilities apache2ctl configtest and a2enmod or a2query can possibly help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.