Apache Ignoring <Directory>
May 17, 2007
I am trying to get Apache to disable .htaccess overrides and php for a certain directory (and it's subdirectories).
I can disable PHP scripting using a .htaccess file containing:
Code:
Options -ExecCGI -Indexes
I now want to disable .htaccess overrides, which Apache's documentation says is only possible in a <Directory> directive. I have therefore attempted to add the following to the website's Virtual host in httpd.conf:
Code:
<Directory /home/ceejayce/www/dropbox/*>
AllowOverride None
</Directory>
However, the above posted .htaccess file (which is located in /home/ceejayce/www/dropbox/2007/.htaccess) still runs and disables ExecCGI and Indexes. So, it looks like the <Directory> directive is not being processed? I have tried it outside the virtual host, straight into the config file - but it works the same way.
Apache's error log says nothing, other than ExecCGI is off in this directory and Directory Index is forbidden (so basically it's reading the options from the .htaccess file and applying them).
I want to make a folder than can only serve static content (no php etc).
View 1 Replies
ADVERTISEMENT
May 27, 2007
i have nameservers setup on my server using (for example) ns1.domain.net and ns2.domain.net with ips 12.12.12.1 and 12.12.12.2, respectively.
Heres my zone file generated by WHM for ns1
Code:
; Modified by Web Host Manager
; Zone File for ns1.animeost.net
$TTL 14400
@ 86400 IN SOA ns1.domain.net. user.gmail.com. (
2007052706
86400
7200
3600000
86400
)
ns1.domain.net. 86400 IN NS ns1.domain.net.
ns2.domain.net. 86400 IN NS ns2.domain.net.
ns1.domain.net. 14400 IN A 12.12.12.1
localhost.ns1.domain.net. 14400 IN A 127.0.0.1
Heres my zone file generated by WHM for ns2
Code:
; Modified by Web Host Manager
; Zone File for ns1.animeost.net
$TTL 14400
@ 86400 IN SOA ns1.domain.net. user.gmail.com. (
2007052706
86400
7200
3600000
86400
)
ns1.domain.net. 86400 IN NS ns1.domain.net.
ns2.domain.net. 86400 IN NS ns2.domain.net.
ns2.domain.net. 14400 IN A 12.12.12.2
localhost.ns2.domain.net. 14400 IN A 127.0.0.1
After i restarted bind, it gave me the error in /var/log/messages
Code:
May 27 15:55:18 mail named[89641]: starting BIND 9.3.4 -u bind -c /etc/namedb/named.conf -t /var/named -u bind
May 27 15:55:18 mail named[89641]: command channel listening on 127.0.0.1#953
May 27 15:55:18 mail named[89641]: /etc/namedb/ns1.domain.net.db:13: ignoring out-of-zone data (ns2.animeost.net)
May 27 15:55:18 mail named[89641]: /etc/namedb/ns2.domain.net.db:12: ignoring out-of-zone data (ns1.animeost.net)
May 27 15:55:18 mail named[89641]: running
I believe that ignoring out-of-zone data is causing my dns to not work properly. I can't ping ns1.domain.net, ns2.domain.net, and domain.net.
View 14 Replies
View Related
Jan 21, 2009
It has been 4 days now from the date i requested there is just silence from eboundhost, looks like they are planing on renewing my account and charging my card? what should i do? cancel the credit card and report them to BBB?
View 14 Replies
View Related
Jul 21, 2007
May be this is a stupid question, but I really don't know why I can't list the files in the root folder of a website(I didn't put any index.html or index.php in the folder).
I point my domain.com to /home/user/docs, the server can list domain.com/test/ files. But it can't list the files of domain.com/. It just shows the page at /var/www/htm, if I don't have any index file under /home/user/docs.
I have this in the httpd.conf file:
<Directory "/home/user/docs">
Options +Indexes
allow from all
</Directory>
View 2 Replies
View Related
Jul 10, 2014
When I enter my_domain.com the browser displays index.php located in httpdocs on my server. When I enter my_domain.com/main/ the browser displays another page, but there's no directory "main" in my httpdocs. Somehow it's redirected to another location (but in URL bar in the browser it's still my_comain.com/main/). I need to find that location.
As I searched through the web, such redirection can be made in .htaccess file, but I can't locate this one either. My server is Apache on CentOS6, and httpdocs directory is located in /var/www/vhosts/my_domain.com. I searched for .htaccess in several locations that I googled, I also tried executing "find / -type d -name '.htaccess'" on PuTTy, but it gives no results.
View 2 Replies
View Related
Apr 20, 2014
When I open my site in a browser and I point the URL to specifically // ipaddress / location A it's all good. (Apache Server)..My problem is, if you open the site in a browser with just the IP address alone it goes there for a second and then automaticlly goes to and opens the other site in location // ipaddress / location B.
However, what I need it to do, I think, is edit the apache conf file to make it open location A as the default. What do I need to do in the apache (httpd-conf) to fix that? For that matter is that the right file to edit?
View 1 Replies
View Related
Oct 15, 2014
I would like to write a rewrite rule that does the following:
RewriteEngine On
Redirect 301 URL...
So what I want is that the first url is rewritten to go to the second ..I have a whole bunch of links that I have to redirect, so I would like to place them all into one .htaccess file or into the default configuration file of apache. So what I do not want is to create SomeFolder1 and someOtherFolder2 and to place a .htaccess file into that place in order to make it work. In fact I want to ignore the folders of the old link and only use the pagename.
View 1 Replies
View Related
Dec 18, 2012
Earlier I made a setup using UNC path in my Apache configuration. I managed to make this work. Now on another installation using Apache 2.2.22 nothing works like before.
This is how my configuration looks like ....
View 4 Replies
View Related
Jan 2, 2014
I have home a server Apache. I want to put all my party songs in one partition and can listen from anywhere without having to take CDs. I have my site in C:Site and the songs I put it in D:Songs.
In php I see the D:Songs directory, I can read subdirectories, I see the .mp3 and .Wav files, I created the playlist, but the audio player doesn't start.
If I move the songs files in C:Site or C:SiteSongs goes perfectly, I can listen my music, but I do not want to be there.
Why I see in D:Songs, but does not want to go? In httpd.conf I have:
DocumentRoot "C:/Site/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
and
<Directory "C:/Site/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
I try to put also:
<Directory "D:/Songs/">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
bud does not work. "What Can I Do"?
[URL] ....
View 7 Replies
View Related
Mar 10, 2014
What is the proper way. to password protect a directory for apache 2.4.7. Information i gather seems to not work.
View 4 Replies
View Related
Jun 2, 2014
In httpd.conf I have
DocumentRoot "C:/Programme/Apache_Group/Tomcat-8.0.5/webapps/ROOT/"
2.4.9 is complaining about this having to be a directory. It is definiteley. I can browse it with explorer.
When I change this to "C:/Program Files/..." it works.
Why is that? In the stock Win32 server I downloaded from the apache site I did not have to make this change.
View 4 Replies
View Related
Jul 16, 2004
I renamed a folder. How I can write a 301 redirect in .htaccess to redirect every file in that folder to the new folder?
View 14 Replies
View Related
Oct 10, 2013
I have an ecommerce store. dns at godaddy. A record www points to the 3dr party hosted shopping cart solution on ip a.a.a.a. I also have a blog. A record blog subdomain points to another server b on ip b.b.b.b hosted away from the shopping cart server a completely.
So www goes one place and blog goes to another.The problem is I need to somehow make the blog appear within the main site as URL...blog instead of as a subdomain blog.domain.com.
I cannot access or modify the hosted shopping cart server in any way. I cannot load wordpress there, that is why it is on a completely separate server.I've been told this is perhaps possible with a reverse proxy configuraton on server b where ip b.b.b.b is.So that even though blog. points to server b it can appear that the url is www.mydomain.com/blog and the blog pages off that directory as well.Can this be done via reverse proxy?
View 8 Replies
View Related
Aug 20, 2005
I'm hoping to redirect visits to any page in an old directory to the index page of a new directory.
In other words, redirect:
[URL] ....
[URL] ....
Is this possible? If so, how could I do it?
In my .htaccess I currently have:
Code :
RedirectPermanent /facts/ http://www.domain.com/newfacts/
but this only redirects the index page.
View 19 Replies
View Related
Apr 9, 2014
Is it possible to lock for example the site down with basic auth and lock a subdirectory of it with a different basic auth?
Example: URL...
<LocationMatch "/*">
AuthType Basic
AuthName "Main Gate"
AuthBasicProvider file
AuthUserFile /etc/accounts
Require valid-user
</LocationMatch>
[code]....
View 1 Replies
View Related
Aug 29, 2013
I have a number of WordPress, Drupal, Wiki sites running under RHEL6.
Apache version:httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 2 2013 08:02:18
We are subject to internal scans by Appscan and Tenable. It is a security requirement so I cannot just block them.
The scanners, of course, attempt to recurse the directory structure and find vulnerable files such as boot.ini, winnt.com and such.
This drives the php content management systems nuts.
Request comes in and is handled by php.
PHP checks the cache for that name and does not find it.
PHP generates a MySQL query and sends it.
MySQL tries and fails to satisfy the query.
MySQL returns result to php.
PHP Writes a cached of the result and presents it to the web.
In other words, a whole lot of processor/memory.
The security scans typically look like......
[Thu Aug 29 00:35:15 2013] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET /../../../../../../../../../../../../etc/passwd HTTP/1.1
[Thu Aug 29 00:35:15 2013] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET ../../../../../../../../../../../../etc/passwd HTTP/1.1
[Thu Aug 29 00:35:15 2013] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET //../../../../../../../../../../../../etc/passwd HTTP/1.1
[Thu Aug 29 00:32:26 2013] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET ....................windowswin.ini HTTP/1.1
[Thu Aug 29 00:32:26 2013] [error] [client XXX.XXX.XXX.XXX] Invalid URI in request GET ....................winntwin.ini HTTP/1.1
I have been able to improve performance, speed and security by mod_rewrite
RewriteRule .*.(dll|ini|exe|com)$ - [R=404,NC]
Now (Finally) the question.
I have not been able to create a rule for the directory recursion.
I want to R=404 any that has a "../.." or "...." or ...." but I can not get it to recognize the string correctly.
I believe that this would improve speed and security.
View 2 Replies
View Related
Jul 18, 2013
I am having an issues with a link in share point which is like
[URL]...
This %20 resolves to a black space and to avoid issues the url is appeneded with %20
Unable to map this directory in httpd.conf file like below
ProxyPass /Shared Documents/Forms/ [URL]...
ProxyPassReverse /Shared Documents/Forms/ [URL]...
I get the below error message
Syntax error on line 1882 of /etc/httpd/conf/httpd.conf:
Invalid ProxyPass|ProxyPassMatch parameter. Parameter must be in the form 'key=value'.
View 6 Replies
View Related
Sep 26, 2013
apache configuration. I try to achieve the functionality in which the user type in browser: mysite.com/projects
View 1 Replies
View Related
Mar 14, 2013
Why my rules don't work as I want?
I want to make hidden rewrite from url like host.sk/dir/dir2
View 4 Replies
View Related
Nov 7, 2005
I am having a lot of problem in implementing mod-rewrite in the Apache 2.0 server due to its configuration that it has the Virtual Directory Support "Disabled".
I got this information from the function phpinfo() which displays a lot of other configuration values along with that.
Now I am unable to enable this Virtual Directory Support in the server and for this my mod-rewrite through .htaccess is not working at all.Subhasis
View 0 Replies
View Related
Apr 19, 2008
I moved the home directory for apache from /usr/local/apache2/htdocs to /home/username/www
When I go to browse the site, I receive a 403 error, You do not have access to / on the server.
It gave the OK default page for apache before moving so I am assuming it is a permission issue.
What do I need to do? apache is running as the default "daemon" user and group.
View 10 Replies
View Related
Feb 18, 2013
I am running Apache2 server (version 2.2.16) on Debian Linux.
My document root for directory listings is set and in that folder I have a few other files to configure the formatting and visual effects. These are:
images(folder)
sorttable.js
style.css
index.php
These files make the root directory look very nice. If I navigate in to a subdirectory, all of the formatting and visual effects are lost and the standard text layout is shown. Is there a way I can get ALL subdirectories in the root directory to take on the visual and layout effects from the root directory?
I know it works if I manually copy each of the files to each of the subdirectories which would be fine, but the subdirectories are created dynamically and new ones are added regularly.
View 1 Replies
View Related
Sep 23, 2013
I am trying to set up log rotation on my Apache Server on Windows 2008 using the rotatelogs.exe executable. I believe I am having issues because my directory path has spaces.
From my understanding, a full path is needed for the ErrorLog but not for the CustomLog
ErrorLog "|"C:/Program Files (x86)/Apache Software Foundation/Apache2/bin/rotatelogs.exe" "C:/Program Files (x86)/Apache Software Foundation/Apache2/logs/Error/Error_%Y-%M-%D.log" 86400"
CustomLog "|bin/rotatelogs.exe logs/Access/Access_%Y-%M-%D.log 86400" common
The error that I get is:
C:Program Files (x86)Apache Software FoundationApache2.2bin>httpd.exe -k start
The system cannot find the path specified.
View 4 Replies
View Related
Sep 15, 2014
I understand that Apache documentation says that the SSLCACertificateFile directive is only valid in "server config" and "virtual host,"
[URL] .....
I would like to use a different CA bundle per-directory or location. Reason being is one directory is more strict than the other.
View 1 Replies
View Related
Dec 19, 2008
i have apache 2 and centos with plesk . when i see my apache error log it shows me :
[Fri Dec 19 05:56:35 2008] [error] [client ::1] Directory index forbidden by Options directive: /var/
www/html/
View 1 Replies
View Related
Jul 15, 2013
I'm new to Apache. I'm using a version 2.4 for Windows 7. It didn't come in as an .msi so I had to configure the appropriate web-server name via the httpd text document.
Each time I go to http://localhost, I am present with a page with the content "It works." I tried adding a different .html file into the directory to see if I could access that also, but I was not able to navigate to it via the address bar. So I edited the content of index.html from 'It works!' to "It works?!!!" but sadly, the actual page is still showing 'It works!' for its content (Rather ironic, huh?).
So, for whatever reason, the actual 'localhost' page isn't updating or even noticing any of my edits in what I presume to be the correct directory.
Here's my httpd document for referenc [URL] ....
View 7 Replies
View Related
Oct 26, 2014
in wordpress is wp-includes folder, i dont want anyone just execute file from this directory so it just serve wordpress not any malicious file be executed from there,
so i added this rule into /wp-includes/.htaccess:
RewriteRule ^(wp-includes)/.*$ ./ [NC,R=301,L]
View 2 Replies
View Related
Jul 19, 2014
I have recently switched from Ubuntu to Mint because I would like to enjoy out of the box functionality. I installed Apache, PHP and Mysql. When I go to localhost, the page displays correctly indicating that the server is functioning. In /var/www/html I created devPages. In devPages I created a symlink to a directory in my home directory where I keep all of my html/php files.
When I point my browser to http://localhost/devPages/1/ I get "You don't have permission to access /devPages/1/ on this server". This appears to be a permissions/ownership issue. I don't want to change the permissions for the directory or files in the home directory because they are set to work properly on my production server. Is there a way to get apache to accept files in my home directory?
I have set owner and group for devPages and the symlink to www-data. Set permissions to 755 for devPages.
By the way, under Ubuntu, I have always used a symlink and it always worked without any issues.
View 1 Replies
View Related
May 31, 2007
I have a situation like this:
There is a directory say, "Master" and inside, "Master" there is sub-directory, "Slave". A user who has access to, "Master" should be able to access, "Slave" automatically. However, a user who has access to, "Slave" should not have access to, "Master". Inside cPanel this type of protection is not possible.
View 3 Replies
View Related