Home > Apache Error > Apache Configuration File Error

Apache Configuration File Error

Contents

current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. up vote 21 down vote favorite 6 This is for a shared config file that should include another file if it exists, but still work otherwise. Note the following example: /usr/local/apache/bin/apachectl configtest About Quinn McHenry Quinn was one of the original co-founders of Tech-Recipes. You could also use *. weblink

Sjur Sørskår For win users this output is given by httpd.exe from console window Omer apachectl -t -f /path/to/the/conf/file/youwant/tested/httpd.conf facebook twitter linkedin Related Tutorials Use Multiple Clash of Clans Accounts on If apachectl is not in your PATH and you do not know where it is, refer to the tech recipe Find a file by name to find the location of apachectl, E.g.: Include foo.con[f] share|improve this answer answered Mar 13 '12 at 18:44 Russell Davis 4,19232338 2 Nice trick. Otherwise, it will return detailed information about the error discovered. read the full info here

Apache Custom Error Pages

As mentioned previously mentioned by Russel Davis, the file part needs to be a wildcard. All logos and trademarks in this site are property of their respective owner. So now I have: IncludeOptional /opt/data/sites/*/conf/vhost-*.conf –Wouter Van Vliet Jun 5 '14 at 11:24 add a comment|

He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York. Good idea, as using * can cause multiple includes to get included in an unexpected order which can cause unexpected behavior when order matters. –user3183018 Aug 6 '15 at 13:09 To test the Apache configuration file for errors, use the following command: apachectl configtest If the configuration file is fine, this command will return Syntax Ok. Apache Custom 500 Error Page So, I tried creating the 'conf' directory for all sites.

I would recommend putting your conf files in an unike folder and include like this Include myfolder/*.conf –Bjørne Malmanger Mar 13 '12 at 18:55 2 Clever indeed! The members, admins, and authors of this website respect your privacy. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed https://httpd.apache.org/docs/2.4/programs/apachectl.html Join them; it only takes a minute: Sign up How do I include a file in Apache config without generating an error when it doesn't exist?

Tech-Recipes: A Cookbook Full of Tech Tutorials Tech-Recipes: A Cookbook Full of Tech Tutorials Contact Us About Us Advertise Android Apple Windows Internet Database Programming Apps Test Apache 404 Error On A File That Exists I prefer [f] rather * as its a bit less risky –fedmich Sep 5 '14 at 0:16 @fedmich. If I do Include foo.conf and foo.conf doesn't exist, apache will complain: could not open document config file /etc/httpd/conf/foo.conf apache share|improve this question asked Mar 13 '12 at 18:42 Russell Davis The Conversation Follow the reactions below and share your own thoughts.

Apache Error Document

Put one of the characters in brackets so Apache will treat it as a glob pattern, which is allowed to match zero files without causing an error. http://www.tech-recipes.com/rx/112/test-the-apache-configuration-file-httpdconf/ View more articles by Quinn McHenry Share this article If this article helped you, please THANK the author by sharing. Apache Custom Error Pages The comments and forum posts are property of their posters, all the rest 2003-2015 by QD Ideas, LLC. Apache 404 Error But still no luck.

Your participation helps us to help others. have a peek at these guys I started out with trying this: IncludeOptional /opt/data/sites/*/conf/apache.conf Which fails if any direcotry in /opt/data/sites does not have a directory 'conf'.

© Copyright 2017 focalhosting.com. All rights reserved.