Apache2 Syntax Error On Line 281
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support ah00526 syntax error on line 74 of etc apache2 apache2 conf Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook apache syntax error on line Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page apache php syntax error Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] apache2 fails to start Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Page 1 of 2 12 Last Jump to page: Results 1 to 10 of 11 Thread: apache2 fails to start Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode January 17th, 2010 #1 husskii View Profile View Forum Posts Private Message Just Give Me the Beans! Join Date Mar 2009 Beans 63 apache2 fails to start Hi Im hoping someone can help me figure how to resolve this apache2 problem I keep getting, I have installed a debian LAMP server with ispconfig3 and everytime I reboot apache fails to start, I don't know and I have done some research but nothing seems to work, which leads me to reinstall everything from scratch again, which is starting to be a pain, I think I have reinstalled at least 10x or more, and would really love a solution pls... when ever I reboot I get the following error Code: Starting web server: apache2apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syntax error on line 66 of /etc/apache2/sites-enabled/monsterhost.co.cc.vhost: Expected but saw failed! I have tried stopping and restarting apache with no success have also creating Code: /etc/apache2/sites-available/www.monsterhost.co.cc with the following text Code: # # Example.com (/etc/apache2/sites-available/www.monsterhost.co.cc) #
Next > husskii New Member Hi when ever I follow the howto The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3] I get the following apache error, every time reboot and then I have to reinstall from scratch again. Code: apache2: Syntax error on line 281 of /etc/apache2/apache2.conf: Syntax error on line 66 of /etc/apache2/sites-enabled/monsterhost.co.cc.vhost: Expected but saw Please if you know how to fix it, I https://ubuntuforums.org/showthread.php?t=1383657 could really use the help. Ive tried researching but none of the post I found really help, and the ones I do follow don't seem to work. husskii, Jan 17, 2010 #1 oilyflutesalad ISPConfig Developer ISPConfig Developer How about posting line 275-285 of /etc/apache2/apache2.conf and line 60-70 of /etc/apache2/sites-enabled/monsterhost.co.cc.vhost ? Until we know https://www.howtoforge.com/community/threads/apache2-fails-on-reboot.42753/ exactly what is on the "error lines", we don't have a clue what the problem is. My guess is that you've modified both these files and removed a tag somewhere. Have you checked that? oilyflutesalad, Jan 17, 2010 #2 husskii New Member hi oilyflutesalad thanks for getting back to me, I dnt think Ive done anything to change or remove any tags, Ive just followed the tutorial word for word and every time I reboot apache2 fails to start, Ive reinstalled over 10x now and was hoping to find a solution so I don't have to reinstall all the time.. the lines 275-285 in /etc/apache2/apache2.conf are Code: # Include of directories ignores editors' and dpkg's backup files, # see README.Debian for details. # Include generic snippets of statements Include /etc/apache2/conf.d/ # Include the virtual host configurations: Include /etc/apache2/sites-enabled/ for Code: /etc/apache2/apache2.conf it only goes as far as 282. and lines 60-70 of /etc/apache2/sites-enabled/monsterhost.co.cc.vhost is Code: php_admin_value upload_tmp_dir /var/www/clients/client0/web9/tmp
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow http://serverfault.com/questions/558283/apache2-config-variable-is-not-defined the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join http://www.centos.org/forums/viewtopic.php?t=1053 them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Apache2 config variable is not syntax error defined up vote 36 down vote favorite 11 I installed apache2 on ubuntu 13.10. If I try to restart it using sudo /etc/init.d/apache2 restart I get this message: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message So I read that I should edit my httpd.conf file. But, since I can't find it in /etc/apache2/ folder, I tried to locate syntax error on it using this command: /usr/sbin/apache2 -V But the output I get is this: [Fri Nov 29 17:35:43.942472 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined [Fri Nov 29 17:35:43.942560 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_PID_FILE} is not defined [Fri Nov 29 17:35:43.942602 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_RUN_USER} is not defined [Fri Nov 29 17:35:43.942613 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined [Fri Nov 29 17:35:43.942627 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.947913 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.948051 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.948075 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} Line 74 of /etc/apache2/apache2.conf is this: Mutex file:${APACHE_LOCK_DIR} default I gave a look at my /etc/apache2/envvar file, but I don't know what to do with it. What should I do? apache-2.2 ubuntu share|improve this question edited Nov 29 '13 at 16:55 asked Nov 29 '13 at 16:49 Kurt Bourbaki 283137 What is in your envvars file? –etagenklo Nov 29 '13 at 17:48 add a comment| 8 Answers 8
must be a directory General support questions Post Reply Print view Search Advanced search 11 posts 1 2 Next sayres Posts: 93 Joined: 2011/06/25 16:05:45 Location: Iran/Karaj [SOLVED] Apache: DocumentRoot must be a directory Quote Postby sayres » 2011/07/31 14:40:32 I just installed CentOS 6 and modified /etc/httpd/conf/httpd.conf like this:Code: Select allDocumentRoot "/home/sayres/Web"However, after doing this, every time I tried to start httpd it gives me the error:Code: Select all
[root@centos ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 292 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
[FAILED]
[root@centos ~]#
What can I do? Top TrevorH Forum Moderator Posts: 16690 Joined: 2009/09/24 10:40:56 Location: Brighton, UK Re: Apache: DocumentRoot must be a directory Quote Postby TrevorH » 2011/07/31 21:21:35 Make sure the directory exist? Make sure that the apache user can read it and can see inside it? Check its selinux context to make sure that Apache is allowed to access it? Or perhaps better, use /var/www/html which already has all of those attributes set up correctly out of the box? Top sayres Posts: 93 Joined: 2011/06/25 16:05:45 Location: Iran/Karaj Re: Apache: DocumentRoot must be a directory Quote Postby sayres » 2011/07/31 21:34:39 Code: Select allCheck its selinux context to make sure that Apache is allowed to access itwho??i want install joomla 1.5 and now my document root is: /var/www/html but when run joomla index.php for installation :http://127.0.0.1/Joomla/encounter a massage:Code: Select allForbidden 403
You don't have permission to access /Joomla/ on this server.
Apache/2.2.15 (CentOS) Server at localhost Port 80what i can doit??? Top TrevorH Forum Moderator Posts: 16690 Joined: 2009/09/24 10:40:56 Location: Brighton, UK Re: Apache: DocumentRoot must be a directory Quote Postby TrevorH » 2011/07/31 21:44:59 Post the output from Code: Select allls -laZ /var/www/html
sestatus
Top sayres Posts: 93 Joined: 2011/06/25 16:05:45 Location: Iran/Karaj Re: Apache: DocumentRoot must be a directory Quote Postby sayres » 2011/07/31 22:00:05 Code: Select all
[sayres@centos ~]$ ls -laZ /var/www/html/
drwxrwxr-x. root sayres system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-rw-r--. root sayres unconfined_u:object_r:httpd_sys_content_t:s0 info.php