Apache Configuration File Error
View more articles by Quinn McHenry Share this article If this article helped you, please THANK the author by sharing. All logos and trademarks in this site are property of their respective owner. The comments and forum posts are property of their posters, all the rest 2003-2015 by QD Ideas, LLC. 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, Source
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! 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. current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.
Apache Custom Error Pages
E.g.: Include foo.con[f] share|improve this answer answered Mar 13 '12 at 18:44 Russell Davis 4,19232338 2 Nice trick. 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. The members, admins, and authors of this website respect your privacy. 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.
You could also use *. So, I tried creating the 'conf' directory for all sites. 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 Custom 500 Error Page 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
But still no luck. Apache Error Document The Conversation Follow the reactions below and share your own thoughts. 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? click here now As mentioned previously mentioned by Russel Davis, the file part needs to be a wildcard.
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 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 So now I have: IncludeOptional /opt/data/sites/*/conf/vhost-*.conf –Wouter Van Vliet Jun 5 '14 at 11:24 add a comment|
- A fellow slacker worked hard to create it.
- More Free Stuff > From Our Partners Venezuelan students demand dialogue results from Spain's Zapatero Chilean public employees end strike Colombia's Santos explains modified peace accord to U.S.
- Un hombre se desintegró en las aguas termales de Yellowstone ¿Qué es el hermoso “resplandor atmosférico”?
- Entretenimiento Jennifer López celebra junto a Marc Anthony su reconocimiento como Persona del Año Mariah Carey se prueba su vestido de novia en el tráiler de Mariah’s World Juan Gabriel gana
- Jetta Productions via Getty Images Why Some Kids Are Put In Special Education And Others In Gifted Programs Valueline via Getty Images 11 Times Trump Has Made People Want To Divorce
- Part of HuffPost News • HPMG News HuffPost Lightbox Skip to main content Latina Videos Selena on Latina 100+ Stars You Never Knew Were Latino Inspiring Latinas #IAmLatina Afro-Latina Beauty Subscribe
- A staff writer for Time magazine for 13 years, Guy wrote the cover story on the emerging U.S.
- Census Bureau, Harvard University, Time Warner, Disney, Pepsi, Kraft Foods, Astra Zeneca and Johnson & Johnson, and is featured in the pilot episode of PBS's America by the Numbers with Maria
- If you change your mind, this is the place to do it.
Apache Error Document
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'. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York. Apache Custom Error Pages 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 Apache 404 Error 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
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. http://msix.org/apache-error/apache-error-bad-file-descriptor.html I prefer [f] rather * as its a bit less risky –fedmich Sep 5 '14 at 0:16 @fedmich.