[root@vmi431722 ~]# systemctl restart apache2
Failed to restart apache2.service: Unit not found.
[root@vmi431722 ~]# systemctl status --no-pager --full apache2
Unit apache2.service could not be found.
[root@vmi431722 ~]#
I’m sorry I’m not really an expert - just a novice trying to get this fixed - thanks so much for you help
Here’s what I got:
[root@vmi431722 ~]# httpd systemctl restart apache2
Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
[root@vmi431722 ~]# httpd systemctl status --no-pager --full apache2
Usage: httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)
[root@vmi431722 ~]#
[root@vmi431722 ~]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.
[root@vmi431722 ~]# systemctl status --no-pager --full httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2023-09-22 19:48:51 BST; 24s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 16795 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 16795 (code=exited, status=1/FAILURE)
Sep 22 19:48:51 vmi431722.contaboserver.net systemd[1]: Starting The Apache HTTP Server…
Sep 22 19:48:51 vmi431722.contaboserver.net httpd[16795]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 27 of /etc/httpd/conf.d/php.conf: Expected before end of configuration
Sep 22 19:48:51 vmi431722.contaboserver.net systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Sep 22 19:48:51 vmi431722.contaboserver.net systemd[1]: Failed to start The Apache HTTP Server.
Sep 22 19:48:51 vmi431722.contaboserver.net systemd[1]: Unit httpd.service entered failed state.
Sep 22 19:48:51 vmi431722.contaboserver.net systemd[1]: httpd.service failed.
[root@vmi431722 ~]#
I don’t understand what you’re asking. The error you posted tells you exactly where to look, and I’ve pointed out exactly where in the error it told you that. I honestly don’t know how to be more precise than saying, “look at line 27 of /etc/httpd/conf.d/php.conf”.
I’m so sorry … Where do I go to find this line 27? how do I get there
Like I said before I don’t know much about this but I can follow your directions to find it and post it - maybe then you can help correct this and hopefully get this working for me Please…
You can use any text editor you are familiar with. You can use the File Manager in Virtualmin to browse to that file, and open it with the built-in editor.
You need to open the file with an editor (nano, vim, emacs, joe, pico, etc.) or viewer (less, more, view, etc.). You cannot execute a plain text file (which is what you tried to do).
There is a text editor built into Webmin’s File Manager, as well.
I am sorry to say this in public, but a lot of questions that are asked in this forum which are not strictly related to the products *min I can find the answers using Google search. Most out of convenience prefer to ask here obviously requesting the small team that should solve other more important problems. In IT even a newbie can solve some tasks without knowledge, in other fields it is not possible, for example medicine. Does anyone practice surgery after reading articles on the Internet?