Not able to restart apache2.
checking sudo netstat -tulpn | grep :80 got this result:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1627/nginx: master
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 4486/java
tcp6 0 0 :::8080 :::* LISTEN 4486/java
tcp6 0 0 :::80 :::* LISTEN 1627/nginx: master
after trying to reload apache2 with systemctl reload apache2got this message:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to reload 'apache2.service'.
Authenticating as: Name Surname,,, (Username)
Password:
==== AUTHENTICATION COMPLETE ===
apache2.service is not active, cannot reload.
Trying several Time to reload the Services, installed / updates services:
- OpenSSH Server
- PHP7
- MySQL
- phpMyAdmin
- Apache Tomcat8
- FTP (vsftpd)
Other messages that could help solve out my issue checking Status
systemctl status apache2.service:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Mon 2017-04-24 20:03:47 CEST; 29min ago
Process: 6623 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)<br><br>
Apr 24 20:03:47 mcServer apachectl[6623]: AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/mysite.conf:
Apr 24 20:03:47 mcServer apachectl[6623]: Invalid command 'ServerAdmin=gianni.alagna@modular.codes', perhaps misspelled or defined by a module not included in the server configuration
Apr 24 20:03:47 mcServer apachectl[6623]: Action 'start' failed.
Apr 24 20:03:47 mcServer apachectl[6623]: The Apache error log may have more information.
Apr 24 20:03:47 mcServer systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 24 20:03:47 mcServer systemd[1]: Failed to start The Apache HTTP Server.
Apr 24 20:03:47 mcServer systemd[1]: apache2.service: Unit entered failed state.
Apr 24 20:03:47 mcServer systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 24 20:18:33 mcServer systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
Apr 24 20:18:35 mcServer systemd[1]: apache2.service: Unit cannot be reloaded because it is inactive.
Additional Note
I'm trying to setup a WebHost server for own Webbased (php) Applications.
nginxlistening on port80? trysystemctl stop nginxthen start apache. – Ravexina Apr 24 '17 at 19:09systemctl stop nginxis stopping the service as expected, but after startingsudo systemctl reload apache2.servicestill got error message: apache2.service is not active, cannot reload. – Gianni Apr 24 '17 at 19:14systemctl status nginx.service... Active: failed (Result: exit-code) since Mon 2017-04-24 21:21:10 CEST; 15s ago... Process: 25502 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS) Process: 25662 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE) Process: 25659 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/ – Gianni Apr 24 '17 at 19:24sudo systemctl restart apache2.serviceand after stopping nginx withsystemctl stop nginxbut nginx won't restart now.. – Gianni Apr 24 '17 at 19:28