I just installed suPHP and now need a little help setting up some environment variables to make it work with my web directory structure.
In the suPHP.conf I have a standard array of global options, what I'm really concerned about is this line:
;Path all scripts have to be in
docroot=${HOME}
;Path to chroot() to before executing script
;chroot=/mychroot
I replaced the default value of /var/www to ${HOME} hoping that it does something.
I know suPHP is running because when I was playing around with the docroot paths I would get an error telling the Documentroot of my site isn't specified in the suPHP configuration.
In my VirtualHost directive I have placed:
<VirtualHost *:80>
ServerAdmin admin#abc.com
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /web/users/abc.com/htdocs
<IfModule mod_suphp.c>
suPHP_ConfigPath ${DOCUMENT_ROOT}/
</IfModule>
<Directory "/web/users/abc.com/htdocs">
AllowOverride All
Order allow,deny
Allow from ALl
</Directory>
</VirtualHost>
Now, I have placed a php.ini in the document root of my VirtualHost and did something simple like display_errors = On and echoed an un declared variable to test it. But I'm not seeing an error pop up (and yes, I have the error level set to E_STRICT and E_ALL).
Further more, I can't seem to get su_PHP_UserGroup to work, on reloading apache i get an error saying that i have a syntax error at that line.
Related
The Problem
I've been trying to setup apache on my mac. I installed apache using brew and everything seems to work except when I actually try to navigate the url with my browser.
Anytime I navigate to http://parenting.localhost/ I just get a 404 error. To make things even more odd, if I just go to http://localhost/ (not using the vhost) it still writes the logs to the vhost log files. Clearly something is wrong, I just can't figure it out. Any help would be appreciated.
My Environment
My /usr/local/etc/httpd/extra/httpd-vhosts.conf:
<VirtualHost *:80>
ServerName parenting.localhost
ServerAlias parenting.localhost.com
DocumentRoot "/Users/joshteam/PhpstormProjects/parenting/public"
<Directory /Users/joshteam/PhpstormProjects/parenting/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /Users/joshteam/PhpstormProjects/parenting/storage/logs/error.log
CustomLog /Users/joshteam/PhpstormProjects/parenting/storage/logs/access.log combined
</VirtualHost>
My /etc/hosts:
127.0.0.1 parenting.localhost
127.0.0.1 parenting.localhost.com
I ensure the VHOST is enabled currently:
$ httpd -t -D DUMP_VHOSTS
VirtualHost configuration:
*:80 parenting.localhost (/usr/local/etc/httpd/extra/httpd-vhosts.conf:24)
What I'm Trying To Do
To navigate to http://parenting.localhost/ and for apache to execute the appropriate index.php within the vhost configuration. Instead I get a 404.
I have a problem that apache configuration. Here my virtual host setting.
<VirtualHost *:80>
ServerName orocrm.75cl.sg
DirectoryIndex app.php
DocumentRoot /var/www/html/oro/web
<Directory /var/www/html/oro/web>
# enable the .htaccess rewrites
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
But, when I access to other menus, http://orocrm.75cl.sg/oro/web/app.php/ is always shown in front of the my targeted menu. So, it was shown 404 page. e.g http://orocrm.75cl.sg/oro/web/app.php/magento/cart/. It should be like that http://orocrm.75cl.sg/app.php/magento/cart/
May I know how do I fix this issue.
I recall that some versions of Apache come with a pre-configured vhost to point to the welcome.conf and such.
So I would suggest commenting the welcome.conf which is at /etc/httpd or on some distros /etc/apache2 and in those same directories find and remove any installation virtual hosts.
After that you should be free of conflicts as the pre defined virtualhost is like follows:
<VirtualHost *:80>
DocumentRoot "/var/www/welcome"
And that is all I can remember from last time looking at the file.
Enjoy
I am using EasyPHP (version 16.1.1) for Apache server (installed version 2.4.18 x86). I need to add a new VirtualHost, so now the whole VirtualHost section of httpd.conf looks like this:
# VIRTUAL HOSTS
## Virtualhost localweb
<VirtualHost 127.0.0.1>
DocumentRoot "C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www"
ServerName 127.0.0.1
<Directory "C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
Order deny,allow
Allow from 127.0.0.1
Deny from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:8080>
UseCanonicalName Off
ServerAdmin marekbuchtela#gmail.com
ServerName posis
ServerAlias posis.tovarna
VirtualDocumentRoot "C:\Users\marek\is\tovarna\public"
</VirtualHost>
The first one is the default one made by EasyPHP, the second one is added by me. However in this setup, the Apache won't start. When I remove the second VirtualHost, everything works fine, but with it, it just won't start at all. I have checked the error log and there is no output at all.
Any ideas why is this happening/how to fix it?
Thanks
Switch VirtualDocumentRoot "C:\Users\marek\is\tovarna\public"for DocumentRoot "C:\Users\marek\is\tovarna\public"
If by any chance you keep getting the error, show error_log output
There is another instance other than the answer given by ezra-s as to why EasyPHP server won't start and the Apache error log is empty.
When declaring paths in the vhosts file, it is important that the directories referenced in those paths exist. If you provide the following VirtualHost information, for example:
<VirtualHost *:80>
DocumentRoot "D:/MyApp/public_html"
ServerName myapp.local
ErrorLog "D:/MyApp/logs/error.log"
CustomLog "D:/MyApp/logs/apache.log" common
</VirtualHost>
...but you don't have a D: drive, or the directories D:/MyApp/ and D:/MyApp/logs/ don't exist, then you'll get a "silent fail" in Apache when starting the HTTP server from the EasyPHP console.
In the apache server installation I have a .conf file which forwards all requests from www.domain.com to c:\www\domain. Now, i'm trying to forward www.domain.com/abcd to a different subfolder locally (say c:\www\abcd). i tried adding another .conf which looked like this.
<VirtualHost *:80>
ServerName www.domain.com/abcd
DocumentRoot "c:/www/abcd"
ErrorDocument 404 /404.php
ErrorLog "C:/logs/error.log"
CustomLog "d:/logs/access.log" common
<Directory "c:/www/abcd">
RewriteEngine on
AllowOverride All
</Directory>
<Location />
Order deny,allow
Deny from all
Allow from all
</Location>
</VirtualHost>
This doesn't work as intended. When i go to www.domain.com/abcd , I guess its trying to access c:\www\domain\abcd and showing not found error. Is there anyway to solve this issue without making DNS entries and without making changes to your local hosts file?
One possible solution would be to make a symbolic link
mklink /D C:\www\domain\abcd C:\www\abcd
I am moving my cakephp website from my old server to rackspace. I can load my website fine but all the CSS and JS is broken. I'm not sure if it's a Cake setting I'm over looking or a Rackspace setting I'm over looking. I have my cake install in
/var
/www
/rp
/app
/cake
etc
etc
This is the error I see whenever I restart apache. Something isn't lining up. Please, let me know if I need to provide any other information to help resolve this issue. Thanks!
Restarting web server apache2
Warning: DocumentRoot [/var/www/app/webroot] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName
... waiting Warning: DocumentRoot [/var/www/app/webroot] does not exist
apache2: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName
...done.
If the DocumentRoot is not specified in apache2.conf, then it defaults to /var/www
However, I usually like to put it in my vhosts file. Make sure your vhost file is included. For example:
Include /private/etc/apache2/extra/httpd-vhosts.conf
An example of a vhost file is as follows:
NameVirtualHost *
<VirtualHost *>
ServerName www.abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/rp/app/webroot/
ErrorLog /var/log/apache2/abc.log
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>