Connected Tutorial(This question is a follow-up to this tutorial):
How To Troubleshoot Common Apache ErrorsHi
I am trying to fix this error: <Directory> directive missing closing ‘>’ in this section:
<Directory /user/share/>
AllowOverride None
Require all granted
</Directory>
What is the first line supposed to look like? I have tried moving the bracket. I am using Ubuntu & apache2.
Thank you
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @millerfuresh,
Here is how it’s in my config
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
Everything on your end looks alright as well. Having said that if you comment it and try to start Apache, does it work or it still gives another error?
Regards, KFSys
Hi @KFSys
I corrected the wording but then got a error on line 168 when I restarted apache
millerfuresh@ubuntu-s-1vcpu-1gb-nyc1-01:~$ sudo apache2ctl -t
apache2: Syntax error on line 168 of /etc/apache2/apache2.conf: </Directory> without matching <Directory> section
Action '-t' failed.
The Apache error log may have more information.
millerfuresh@ubuntu-s-1vcpu-1gb-nyc1-01:~$
Thank you @KFSys! This worked
#<Directory /usr/share>
# AllowOverride None
# Require all granted
#</Directory>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.