logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS Twitter


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Syntax errors on restart
Author
budy



Joined: 18 Feb 2023
Posts: 4
Location: USA

PostPosted: Sat 18 Feb '23 21:03    Post subject: Syntax errors on restart Reply with quote

I've been trying to restart apache ("sudo service apache2 restart") and I keep getting this error: "Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details." so then i typed in " apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2023-02-18 18:56:44 UTC; 26s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 1523 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 35ms

Feb 18 18:56:44 laptopstorage systemd[1]: Starting The Apache HTTP Server...
Feb 18 18:56:44 laptopstorage systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Feb 18 18:56:45 laptopstorage apachectl[1526]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 15 of /etc/apache2/sites-enabled/000-default.conf: Expected </Di>
Feb 18 18:56:44 laptopstorage systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 18 18:56:45 laptopstorage apachectl[1523]: Action 'start' failed.
Feb 18 18:56:45 laptopstorage apachectl[1523]: The Apache error log may have more information.
Feb 18 18:56:44 laptopstorage systemd[1]: Failed to start The Apache HTTP Server."

I cant get any off them to work.
The first one this is the line "IncludeOptional sites-enabled/*.conf"
The second one is "</Directory>"

the second set of errors is much longer and ill post it later.

(very new to this kind of thing so I hope I did it right)
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7187
Location: Germany, Next to Hamburg

PostPosted: Mon 20 Feb '23 12:17    Post subject: Reply with quote

A syntax check without restart works like

Code:

source /etc/apache2/envvars
/usr/sbin/apache2ctl -S


For the config files you may use http://apaste.info/ or http://hastebin.com/ so we can take a look at it.
Back to top
budy



Joined: 18 Feb 2023
Posts: 4
Location: USA

PostPosted: Tue 21 Feb '23 2:12    Post subject: Reply with quote

apache2.conf

https://hastebin.com/share/gobaqeguyi.yaml

000-default.conf

https://hastebin.com/share/qovurodime.bash
Back to top
budy



Joined: 18 Feb 2023
Posts: 4
Location: USA

PostPosted: Tue 21 Feb '23 2:18    Post subject: Reply with quote

James Blond wrote:
A syntax check without restart works like

Code:

source /etc/apache2/envvars
/usr/sbin/apache2ctl -S


the first one came back with nothing the second one came back with a syntax error identical to the last one other than it said "Action '-S' failed" before kicking me off the ssh.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7187
Location: Germany, Next to Hamburg

PostPosted: Tue 21 Feb '23 10:43    Post subject: Reply with quote

Found it

Code:

<Directroy /var/www/nextcloud/>


"Directroy" is a typo. Change it to Directory
Back to top
budy



Joined: 18 Feb 2023
Posts: 4
Location: USA

PostPosted: Wed 22 Feb '23 18:05    Post subject: Reply with quote

it worked thank you
Back to top


Reply to topic   Topic: Syntax errors on restart View previous topic :: View next topic
Post new topic   Forum Index -> Apache