Softaculous


Topic : Apache Issues (AMPPS 2.2 OSX 10.9.1)


Posted By: marky_g on January 14, 2014, 6:10 am
Apache does not start. 

sudo /Applications/AMPPS/apache/bin/httpd

"AH00526: Syntax error on line 207 of /Applications/AMPPS/apache/conf/httpd.conf:
DocumentRoot must be a directory"

Document root directory does exist though.


Posted By: ketan on January 15, 2014, 6:58 am | Post: 1
Hi,

Have you made any changes in Apache configuration file?

Please take the backup of /Applications/AMPPS/conf/httpd.conf and /Applications/AMPPS/apache/conf/httpd.conf files and restore the Apache default configuration(Goto AMPPS->Apache->Restore Default Configuration) and then try to start Apache again.

Let us know if you still facing the problem.

-----------------------
Follow AMPPS on,
Twitter
Facebook
Google+

Posted By: marky_g on January 15, 2014, 4:59 pm | Post: 2
Quote From : ketan January 15, 2014, 6:58 am
Hi,

Have you made any changes in Apache configuration file?


Yes i have.  The apache default configuration files work fine. 

The problem occurs when i try to change the document root directory;

httpd.conf
207 DocumentRoot “/Users/MarkyG/Documents/www"
236 <Directory "/Users/MarkyG/Documents/www">

This setup worked with Mountain Lion, maybe Mavericks requires some changes.

Posted By: tidus on January 16, 2014, 7:14 am | Post: 3
Quote From : marky_g January 15, 2014, 4:59 pm
Quote From : ketan January 15, 2014, 6:58 am
Hi,

Have you made any changes in Apache configuration file?


Yes i have.  The apache default configuration files work fine. 

The problem occurs when i try to change the document root directory;

httpd.conf
207 DocumentRoot “/Users/MarkyG/Documents/www"
236 <Directory "/Users/MarkyG/Documents/www">

This setup worked with Mountain Lion, maybe Mavericks requires some changes.


Hi,

We don't recommend to change as we have never tested it.

We also mention DocumentRoot in <VirtualHost 127.0.0.1:80> in the same httpd.conf so please change the value of that too.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: marky_g on January 16, 2014, 8:34 pm | Post: 4
So the Document Root directory has to be located within the AMPPS application folder in Mavericks, unlike Mountain Lion. 

Also, I use the httpd-vhosts.conf file for Virtual Hosts where the necessary changes had been made that reflected the Document Root directory used in htppd.conf.

Posted By: tidus on January 17, 2014, 6:46 am | Post: 5
Quote From : marky_g January 16, 2014, 8:34 pm
So the Document Root directory has to be located within the AMPPS application folder in Mavericks, unlike Mountain Lion. 

No. It can be outside Ampps application folder.
Quote

Also, I use the httpd-vhosts.conf file for Virtual Hosts where the necessary changes had been made that reflected the Document Root directory used in htppd.conf.

Create different file for vhosts created by you. As it is used by Ampps and will regenerate when the new domain is added.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: marky_g on January 19, 2014, 12:23 am | Post: 6
Ok, I'm a little bit confused right now. 

So it is possible for the document root directory to be outside the AMPPS application folder, however you advised not to change the apache config file as it has not been tested. 

Could you please list the steps required to change the document root directory for AMPPS under Mavericks without modifying the apache config file.

Regards, Mark.








Posted By: tidus on January 19, 2014, 8:14 am | Post: 7
Hi,

We don't recommend as we have not tested it. But you can always change the configuration as per your need if you know what you are doing.

Steps :
1. Open AMPPS Application -> Apache Tab -> Configuration
2. Search for DocumentRoot, you should find two entries.
3. Change them as per your need and Save the file.
4. Open apache/conf/extra/vhosts-httpd.conf
5. Look for the entry <VirtualHost 127.0.0.1:80>, if its present, copy the whole VirtualHost Tag
6. Create a new file say my-vhosts.conf in the same directory and paste the copied text there.
7. Open AMPPS Application -> Apache Tab -> Configuration
8. Find the line Include conf/extra/httpd-vhosts.conf, copy the same line and paste it below.
9. Modify it so t looks like Include conf/extra/my-vhosts.conf. Save the file.
10. Restart the apache.

Note: 5,6,7,8,9 steps are needed only if VirtualHost entry is present in Include conf/extra/httpd-vhosts.conf.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: dashard on August 14, 2014, 3:21 am | Post: 8
Can you clarify if you want us to CUT the <VirtualHost> config in step 5 or COPY?

If we copy, then the vhost declaration exists in both files. Is that what the goal is?

I ask because I did it, and it did not work as expected. It didn't break anything, but my alias did not work.

Thanks in advance.

Posted By: tidus on August 14, 2014, 4:21 am | Post: 9
Quote From : dashard August 14, 2014, 3:21 am
Can you clarify if you want us to CUT the <VirtualHost> config in step 5 or COPY?

If we copy, then the vhost declaration exists in both files. Is that what the goal is?

I ask because I did it, and it did not work as expected. It didn't break anything, but my alias did not work.

Thanks in advance.


What are you trying to achieve ?


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: dashard on August 14, 2014, 5:55 am | Post: 10
Quote From : tidus January 19, 2014, 8:14 am
Hi,

We don't recommend as we have not tested it. But you can always change the configuration as per your need if you know what you are doing.

Steps :
1. Open AMPPS Application -> Apache Tab -> Configuration
2. Search for DocumentRoot, you should find two entries.
3. Change them as per your need and Save the file.
4. Open apache/conf/extra/vhosts-httpd.conf
5. Look for the entry <VirtualHost 127.0.0.1:80>, if its present, copy the whole VirtualHost Tag
6. Create a new file say my-vhosts.conf in the same directory and paste the copied text there.
7. Open AMPPS Application -> Apache Tab -> Configuration
8. Find the line Include conf/extra/httpd-vhosts.conf, copy the same line and paste it below.
9. Modify it so t looks like Include conf/extra/my-vhosts.conf. Save the file.
10. Restart the apache.

Note: 5,6,7,8,9 steps are needed only if VirtualHost entry is present in Include conf/extra/httpd-vhosts.conf.


I want to customize the vhost file, but doing so to the AMPPS-generated one will not succeed. That's the reason for the above steps 4-10, right?

I want to add an alias to redirect a certain path. That's it.

Posted By: tidus on August 14, 2014, 6:01 am | Post: 11
Hi,

Yes. It is right. But make sure the VirtualHost you are copying is working properly. I mean it is accessible correctly.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Posted By: dashard on August 14, 2014, 6:08 am | Post: 12
It is accessible, but the Alias does not work.

You still haven't answered my original question: in Step 5, do you mean CUT the entire <VirtualHost…> entry out or COPY? Should it appear in both the AMPPS vhosts.conf file as well as the user-created one (my-vhosts.conf)?

Posted By: tidus on August 14, 2014, 6:11 am | Post: 13
Quote From : dashard August 14, 2014, 6:08 am
It is accessible, but the Alias does not work.

You still haven't answered my original question: in Step 5, do you mean CUT the entire <VirtualHost…> entry out or COPY? Should it appear in both the AMPPS vhosts.conf file as well as the user-created one (my-vhosts.conf)?


Copy.

If the domain name are resolved from hosts file, you will have to add the entry manually.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.