Home > Apache Error > Apache Configuration File Error
Apache Configuration File Error
E.g.: Include foo.con[f] share|improve this answer answered Mar 13 '12 at 18:44 Russell Davis 4,19232338 2 Nice trick. 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! 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. current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. have a peek here
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. As mentioned previously mentioned by Russel Davis, the file part needs to be a wildcard. Otherwise, an unmatched globular path with Include will error out while one with IncludeOptional will be silently ignored. –Spencer Williams Apr 30 '14 at 16:04 3 It doesn't seem to 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 More hints
Apache Custom Error Pages
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. 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, Otherwise, it will return detailed information about the error discovered.
- Hong/ASSOCIATED PRESS Don't Be Surprised.
- In this volatile economy, we need many more of the latter.
- Guy is a contributor to the Huffington Post, the National Journal, and NPR's Latino USA.
- Phil Quiet Revolution Talk to Me Don't Stress the Mess Endeavor Fearless Dreamers Generation Now Inspiration Generation Paving the Way The Power Of Humanity Sleep + Wellness What's Working: Purpose +
- AR عربي (Arabic) AU Australia BR Brasil CA Canada DE Deutschland ES España FR France GR Ελλάδα (Greece) IN India IT Italia JP 日本 (Japan) KR 한국 (Korea) MG Maghreb MX
- Read Whole Story Page: 1 FOLLOW HUFFPOST Email Facebook Twitter Google Plus RSS Mobile Please check the checkbox to indicate your consent The Morning Email Newsletters Get top stories and blog
So, I tried creating the 'conf' directory for all sites. I prefer [f] rather * as its a bit less risky –fedmich Sep 5 '14 at 0:16 @fedmich. The members, admins, and authors of this website respect your privacy. Apache Custom 500 Error Page The comments and forum posts are property of their posters, all the rest 2003-2015 by QD Ideas, LLC.
Note the following example: /usr/local/apache/bin/apachectl configtest About Quinn McHenry Quinn was one of the original co-founders of Tech-Recipes. Apache Error Document 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 View more articles by Quinn McHenry Share this article If this article helped you, please THANK the author by sharing. 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'.
The Conversation Follow the reactions below and share your own thoughts. Apache 404 Error On A File That Exists 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? All logos and trademarks in this site are property of their respective owner. 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 Error Document
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. Apache Custom Error Pages You could also use *. Apache 404 Error 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 |
Your participation helps us to help others. http://apexintsoft.com/apache-error/apache-error-log-file-keeps-growing.php 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