Zend Framework - 500 Internal Server Error - php

Today I create my first project with Zend Framework but when I try to connect to my project I see only "500 Internal Server Error". I add some new rows in httpd.conf file:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:\AppServ\www\data1\public
ServerName my_ip
</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:\AppServ\www\data1\public
ServerName http://my_ip
</VirtualHost>
And that is my htaccess file:
RewriteEngine On
#RewriteBase data1/public/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteRule !\.(js|ico|gif|jpg|png|css|swf|html|pps)$ index.php [NC,L]
order allow,deny
allow from all
I read more topics for this problem but for now problem is not solved.
That is my error.log file(from server):
[Wed Aug 08 01:46:02 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5 \\ext\\php_exif.dll' - \xd3\xea\xe0\xe7\xe0\xed\xe0\xf2\xe0 \xef\xf0\xee\xf6\xe5\xe4 \xf3\xf0\xe0 \xed\xe5 \xe5 \xed\xe0\xec\xe5\xf0\xe5\xed\xe0.\r\n in Unknown on line 0
[Wed Aug 08 01:46:02 2012] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Wed Aug 08 01:46:02 2012] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 08 01:46:02 2012] [notice] Parent: Created child process 2392
[Wed Aug 08 01:46:02 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Wed Aug 08 01:46:02 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_exif.dll' - \xd3\xea\xe0\xe7\xe0\xed\xe0\xf2\xe0 \xef\xf0\xee\xf6\xe5\xe4\xf3\xf0\xe0 \xed\xe5 \xe5 \xed\xe0\xec\xe5\xf0\xe5\xed\xe0.\r\n in Unknown on line 0
[Wed Aug 08 01:46:02 2012] [notice] Child 2392: Child process is running
[Wed Aug 08 01:46:02 2012] [notice] Child 2392: Acquired the start mutex.
[Wed Aug 08 01:46:02 2012] [notice] Child 2392: Starting 64 worker threads.
[Wed Aug 08 01:46:02 2012] [notice] Child 2392: Starting thread to listen on port 80.
[Wed Aug 08 01:46:15 2012] [alert] [client 46.40.124.225] C:/AppServ/www/data1/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Thanks for posting the error log.
From the looks of it, you don't have mod_rewrite loaded.
Find your httpd.conf file and locate the line:
#LoadModule rewrite_module modules/mod_rewrite.so
Remove the # sign from the beginning of the line.
Next, add a new section to httpd.conf that looks like this:
<Directory "C:/AppServ/www/data1/public">
Options FollowSymLinks
AllowOverride All
</Directory>
The AllowOverride directive is important. By default, .htaccess files are not processed unless allowed. This line allows .htaccess files in that named directory.
After making those changes, restart Apache and then try loading your ZF page again.

First of all, a better debugging. Add
ErrorLog "PATH_TO/zfapp-error_log"
CustomLog "PATH_TP/zfapp-access_log" combined
to your virtualhost. Restart apache and reload your page. The files will be created in the specified path. There will be an exact error message wich will help you debug further.

I just had the exact same problem and the solution by drew010 did fix it indeed!
However, it seems Apache config structure changed, so the method to enable the missing module is slightly different:
$ cd /etc/apache2/mods-enabled
$ sudo ln -s ../mods-available/rewrite.load ./rewrite.load
This confirms you have the right stuff going:
$ cd /etc/apache2/mods-enabled
$ cat ./rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
Cheers!

Related

Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration

Currently, I am setting my local environment for a project.
Project runs on production environment with nginx server. But in the local development, using apache server. I've installed LAMP stack on my ubuntu machine. There is already a virtual host file provided and I have setup it. So far I've created xxx.conf file under /etc/apache2/sites-available.
The file includes:
<VirtualHost *:80>
ServerName xxx
DocumentRoot /home/ubuntuser/Downloads/xxx-master/public
<Directory "/home/ubuntuser/Downloads/xxx-master/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xxx-error.log
CustomLog ${APACHE_LOG_DIR}/xxx-access.log combined
SetEnv ENVIRONMENT "development"
</VirtualHost>
I also created .htaccess file under /home/ubuntuser/Downloads/xxx-master/public. The content of this file downloaded from production environment.
The content of .htaccess file is:
RewriteEngine On
RewriteBase /
location ~ ^/site { rewrite ^/site(.*)$ https://local.xxx.com/$1 redirect;}
So, when I type local.xxx.com in browser, it gives 500 Internal Error.
So, I was defined xxx-error.log in virtual host config file. I've opened it. The content is:
[Tue May 28 22:23:33.231851 2019] [core:alert] [pid 5677] [client 127.0.0.1:56504] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue May 28 22:23:33.254608 2019] [core:alert] [pid 5678] [client 127.0.0.1:56506] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context, referer: http://local.xxx.com/
[Tue May 28 22:33:22.300863 2019] [core:alert] [pid 6326] [client 127.0.0.1:56740] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration
[Tue May 28 22:33:22.317420 2019] [core:alert] [pid 6327] [client 127.0.0.1:56742] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration, referer: http://local.xxx.com/
So, I understand there is problem in the .htaccess but i don't know how to solve it.
You are using apache and in your .htaccess using the convention of Nginx.
Refer to latest documentation of apache2.4
To me it seems like you want to redirect use this
RewriteRule ^/site(.*)$ https://local.xxx.com/$1 or maybe this
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

IBM HTTP Server (Apache2) error

I have configured IBM HTTP Server as follow:
<IfModule mod_fastcgi.c>
Options Indexes MultiViews ExecCGI
FastCGIServer "c:/php7.1/php-cgi.exe"
SetHandler fastcgi-script
</IfModule>
<Directory "C:/IBM/HTTPServer85/htdocs/public">
AddHandler fastcgi-script .php
Options FollowSymLinks Indexes MultiViews ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
I get the following errors:
[Mon Jan 29 12:17:22 2018] [notice] Child 8328: Starting 600 worker threads.
[Mon Jan 29 12:17:22 2018] [notice] FastCGI: process manager initialized
[Mon Jan 29 12:17:22 2018] [warn] FastCGI: server "C:/php7.1/php-cgi.exe" started (pid 4636)
[Mon Jan 29 12:17:22 2018] [notice] Child 8328: Listening on port 443.
[Mon Jan 29 12:17:22 2018] [notice] Child 8328: Listening on port 8443.
[Mon Jan 29 12:17:24 2018] [error] [client 192.168.107.169] (OS 2)The system cannot find the file specified. : FastCGI: stat() of "C:/IBM/HTTPServer85/htdocs/public/login/" failed
[Mon Jan 29 12:17:24 2018] [crit] (OS 193)%1 is not a valid Win32 application. : FastCGI: can't start (dynamic) server "C:/IBM/HTTPServer85/htdocs/error/500/index.php": spawn_fs_process() failed
[Mon Jan 29 12:17:24 2018] [crit] [Mon Jan 29 12:17:24 2018] file G:\\blddir\\IHS85\\apache\\modules\\fastcgi\\fcgi_pm.c, line 1787, assertion "s->procs[i].pid < 0" failed
What is wrong with my http.conf?
It looks like you have a hybrid/partial config of multiple ways to configure fastcgi.
In the era of mod_fastcgi (IHS 8.5.5 and earlier), you'd typically see the "Action" directive here which results in a request for foo.php to be passed to the PHP interpreter as an argument.
Since you don't have action, and your SetHandler does not limit to
any particular extension, mod_fastcgi tries to invoke your php script
directly as an executable. On Windows, this association of what intepreter to use is the global one of the OS.
If you stick with mod_fastcgi, I'd suggest using the boilerplate examples with Action you see everywhere. But there's no reason to torture yourself with this when even IHS 9 has mod_proxy_fcgi and you could instead configure that and php-fpm instead.

Serve php RESTful server with apache2 (ubuntu)

I have a ubuntu machine on which I want to run a php rest server. Here is my default config file:
ServerName localhost
<VirtualHost *:80>
DocumentRoot /var/www/html/otherSite
ServerName www.vlio20_paka.com
Alias /otherSite /var/www/html/otherSite
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/lbserver/public
ServerName www.vlio20_lb.com
Alias /lbServer /var/www/lbserver/public
<Directory /var/www/lbserver/public>
AllowOverride all
DirectoryIndex index.php
Require all granted
</Directory>
</VirtualHost>
In my public directory I have .htaccess file:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
When I try to access the server http://MACHINE_IP/lbServer
I am getting Not Found error.
How can I make it work
(I am doing apache restart after each change in the config file)?
Update:
apache2 -t produced:
[Sun Jun 28 12:00:00.789522 2015] [core:warn] [pid 22089] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined
[Sun Jun 28 12:00:00.789835 2015] [core:warn] [pid 22089] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sun Jun 28 12:00:00.789970 2015] [core:warn] [pid 22089] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sun Jun 28 12:00:00.790088 2015] [core:warn] [pid 22089] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sun Jun 28 12:00:00.790240 2015] [core:warn] [pid 22089] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Jun 28 12:00:00.794721 2015] [core:warn] [pid 22089:tid 140102153521024] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Jun 28 12:00:00.795136 2015] [core:warn] [pid 22089:tid 140102153521024] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun Jun 28 12:00:00.795200 2015] [core:warn] [pid 22089:tid 140102153521024] 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}
note: the first site is loading fine but the second gives a 404 error.
First this as almost nothing to do with a REST problem. It is a simple configuration error.
Second, for apache2 -t you should run . /etc/apache2/envvars before, because you need some envs variables loaded.
Then the configuration problem.
Your are defining 2 named based Virtualhosts, 1 with the name www.vlio20_paka.com and one with the name www.vlio20_lb.com. The first one is defined first, so if you use an unknown name it will be used, by default.
When you make a query this way:
http://MACHINE_IP/lbServer
the Host header used in your HTTP query is MACHINE_IP, so it's not www.vlio20_paka.com and not www.vlio20_lb.com. If you have no other default virtualhost (something you would find using apache2 -S) the first one will be used.
Let's have a look at the first one:
<VirtualHost *:80>
DocumentRoot /var/www/html/otherSite
ServerName www.vlio20_paka.com
Alias /otherSite /var/www/html/otherSite
</VirtualHost>
If we fall here the path searched on your disk will be DocumentRoot+url, so /var/www/html/otherSite/lbServer. You have a 404, chances are this path does not exists.
Note that your Alias instructions here simply tells Apache that a request to http://www.vlio20_paka.com/ and a request to http://www.vlio20_paka.com/otherSite would both point to the /var/www/html/otherSite/ directory, maybe not what you wanted to do.
Alias is simply a way to define some sort of url symlinks on the url-to-filesystem maps.
Let's now look the second VirtualHost, that you can only reach if you use the right name in your HTTP request, that is not requesting http://MACHINE_IP/lbServer but http://www.vlio20_lb.com/lbServer (for that you could an entry in your /etc/hosts file, on the machine running the http query).
<VirtualHost *:80>
DocumentRoot /var/www/lbserver/public
ServerName www.vlio20_lb.com
Alias /lbServer /var/www/lbserver/public
<Directory /var/www/lbserver/public>
AllowOverride all
DirectoryIndex index.php
Require all granted
</Directory>
</VirtualHost>
So here you set a DocumentRoot at /var/www/lbserver/public but also, via Alias, you tell Apache that a request to http://www.vlio20_lb.com/lbServer/ point to the same entry as http://www.vlio20_lb.com/.
Your best fix would be to add an entry in /etc/hosts a request your test websites with real names, so that you can use Name based VirtualHosting. Or use only one VirtualHost and try things with aliases, but that's usually far from the production settings.
The only thing I think of without seeing more of your config.
Change:
<Directory /lbserver>
DirectoryIndex index.php
</Directory>
To:
<Directory /lbserver>
DirectoryIndex index.php
Require all granted
</Directory>
In ubuntu there is no binary httpd, apache2 used instead:
ricardo#zeus:~$ httpd -t
No se ha encontrado la orden «httpd», quizás quiso decir:
La orden «xttpd» del paquete «xtide» (universe)
La orden «https» del paquete «httpie» (universe)
La orden «http» del paquete «httpie» (universe)
httpd: no se encontró la orden
ricardo#zeus:~$ apache2 -t
Now , paste the command output ;-)

PHP file is not executing code

My PHP code is not executed when I access the root directory with
http://localhost/sample.php
The code I want to run is:
<?php phpinfo(); ?>
But my code is just shown on the browser, it is not executing.
I tried to:
restart all services several times including putting WampServer online;
changing the listening port in httpd.conf to 8080.
There is not any error in the PHP error log But in Apache Error Log there are errors as following:
[Tue Jun 09 08:53:52 2015] [notice] Apache/2.2.21 (Win32) PHP/5.3.10 configured -- resuming normal operations
[Tue Jun 09 08:56:30 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/
[Tue Jun 09 08:56:30 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/
[Tue Jun 09 09:22:23 2015] [error] [client ::1] (20023)The given path was above the root path: Cannot map GET /C:/wamp/www HTTP/1.1 to file
[Tue Jun 09 09:22:24 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/C:/wamp/www
[Tue Jun 09 09:26:26 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/
[Tue Jun 09 09:26:26 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/
[Tue Jun 09 09:26:46 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:26:46 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue Jun 09 09:30:10 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:30:10 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue Jun 09 09:31:21 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:31:21 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
Your problem is that your browser has decided to use the IPV6 stack rather than the IPV4 stack hence the ip address ::1 in the error messages rather that the more usual `127.0.0.1' IPV4 loopback address.
As IPV6 was very new when the version of WAMPServer that comes with Apache/2.2.21 Apache was released, and is not configured to expect access from the IPV6 loopback address ::1 so you will have to amend the config.
Edit httpd.conf using the wampmanager menus to make sure you edit the correct file. Then look for this section, it will probably look something like this :-
<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
So change these lines as follows
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost <-- this line
See I have added the ip address ::1 and also localhost
You will also have to change the file that controls access to phpMyAdmin in the same way :-
Edit \wamp\alias\phpmyadmin.conf and change
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1
To
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1 ::1
You may also need to amend the sqlbuddy and webgrind configs in the same way if you actually use those features.
I assume that you are using windows 8.
Try these:
1. In httpd.conf file, change
Listen 80 line with Listen 127.0.0.1:8080
2. Disable windows firewall. If it works that way, you need to open your port 8080 (adding an exception to windows firewall).
3. If there are any services using port 8080, stop these services, restart wampserver and try again.
4. If none of these works for you, try to change these lines in your wampserver apache configuration file (httpd.conf) and after saving, restart the apache server.
Order Deny, Allow
Deny from all
Allow from 127.0.0.1 :: 1 localhost
Allow from 192.168
Allow from 10.186
First check your localhost is running or not by
http://localhost
if it was not working then it could because of 8080 port conflict assign some other port to apache.Even this could not solve your problem then fastest and easiest way to get rid of this thing is by reinstalling your wampserver download it from here http://www.wampserver.com/en/ a nice installation description provided there.

HTTP/1.1 403 Forbidden [googlebot]

i really need your help..
my websites ranking is now loosing because of this error, and i don't know how to fix this.. even my web hosting provider can't fix this.
when i fetch as google there's an error
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to
use an ErrorDocument to handle the request.
and also when i view my website via googlebot 2.1 using user agent switcher i got that error too, and when i test my sitemaps on webmaster tool, i got
General HTTP error: HTTP 403 error (Forbidden) HTTP Error: 403
and hope you guys help me..
this is my
.htaccess
BEGIN WordPress
RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}
!-d RewriteRule . /index.php [L]
END WordPress
this i my website: http://www.naruto-tv.info
all subdomain and other domain that i'm using right now had a same problem and hosted on same server. but i have one subdomain that hosted on other server and working fine.
i also already contacted my server provider but they can't fix it.
ERROR LOGS:
[Mon Apr 14 14:02:28 2014] [error] [client 66.249.77.159] client
denied by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:28 2014] [error] [client 66.249.77.159] client
denied by server configuration:
/home/markgelo/public_html/markgiver/page
[Mon Apr 14 14:02:20 2014] [error] [client 199.21.148.45] client
denied by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:20 2014] [error] [client 199.21.148.45] client
denied by server configuration:
/home/markgelo/public_html/markgiver/carimi-invasion-2013-itunes-aac-m4a-album
[Mon Apr 14 14:02:15 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/403.shtml
[Mon Apr 14 14:02:15 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/2013
[Mon Apr 14 14:02:07 2014] [error] [client 37.59.30.32] client denied
by server configuration:
/home/markgelo/public_html/markserves/403.shtml
[Mon Apr 14 14:02:07 2014] [error] [client 37.59.30.32] client denied
by server configuration: /home/markgelo/public_html/markserves/2013
[Mon Apr 14 14:02:06 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/403.shtml
[Mon Apr 14 14:02:06 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/tag
[Mon Apr 14 14:02:05 2014] [error] [client 142.4.208.99] client denied
by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:05 2014] [error] [client 142.4.208.99] client denied
by server configuration: /home/markgelo/public_html/markgiver/2013
[Mon Apr 14 14:02:05 2014] [error] [client 66.249.77.99] client denied
by server configuration: /home/markgelo/public_html/android/403.shtml
[Mon Apr 14 14:02:05 2014] [error] [client 66.249.77.99] client denied
by server configuration: /home/markgelo/public_html/android/
[Mon Apr 14 14:02:05 2014] [error] [client 37.59.42.24] client denied
by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
Seems that it is not .htaccess error as it seems that it is vhost settings problem generally. I you have purchased shared hosting then request you contact your service provided to resolve the issue for HTTP/1.1 403 Forbidden problem for bots.
There can be two reasons for the problem but you need Administrative access to server to resolve the issue:
First
First Reason is the directories hosted outside of the default /var/www/. Apache requires permissions to all the directories all the way up to the root of the file system where the site is hosted. In case using default location setting are automatically done and if the settings are default then this doesn't apply to you.
For example, you've got a development machine and your site's directory is:
/abc/home/mywebsite/
You may think you can get away with:
chgrp -R www-data /abc/home/mywebsite/
chmod -R 2750 /abc/home/mywebsite/
because this gives Apache permissions to access your site's directory? Well that's correct but it's not sufficient. Apache requires permissions all the way up the directory tree so what you need to do is:
chgrp -R www-data /abc/
chmod -R 2750 /abc/
Obviously I would not recommend giving access to Apache on a production server to a complete directory structure without analysing what's in that directory structure.
Second
Global Setting in the global directory setting in the httpd.conf or in the specific directory block in httpd-vhosts.conf:
Options Indexes FollowSymLinks Includes ExecCGI
By default, your global directory settings is (httpd.conf line ~188):
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
set the options to :
Options Indexes FollowSymLinks Includes ExecCGI
Finally, it should look like:
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
Let me know if the issue doesn't resolved.
Editing
Ok. So, the service Provider is not ready to Change setting as it is shared server. Then you must request him to change your hosting changes only through http-vhosts.conf as:
<VirtualHost *:80>
DocumentRoot "abc" #Your Server root directory
ServerName def #Your Website name.
<Directory "abc"> #Your Directory Changes
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This will only effect your hosting setting not the other web hosting provided on shared server. Request them to change this. Hoping that they would change these setting this time.

Categories