Hot answers tagged httpd.conf
5
I would have said that placing these sensitive files above the document root would be preferable. And perhaps easier to manage if they are all contained in a particular directory, however...
Using .htaccess to prevent access to all .db and .exe files and return a 403 - Forbidden.
<Files ~ "\.(db|exe)$">
Deny from all
</Files>
Unless you have ...
3
You have to question some confusion, so I'll talk about ways to do a redirect from www to no-www:
1.Create two VirtualHost for two domains and use 301 redirect:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName example.com
DocumentRoot "/path/to/site"
</VirtualHost>
<VirtualHost *:80>
ServerName www.example.com
Redirect ...
3
When you type an URL in a browser, unless you specify the port explicitly, the browser will assume port 80 (unless the path is HTTPS, in which case port 443 is assumed). Technically any URL can be rewritten to include :80 port directive. It is just redundant.
On the server side there can only be one service listening at port 80. So, no, you can not have ...
3
The s-maxage header is intended for proxies, while max-age is intended for regular users.
A typical end user (not using a proxy) would have the file cached for a year. The same should be the case for someone using a proxy as well, since the proxy will likely send the file unmodified, i.e. including the max-age header.
But the proxy itself would only cache ...
2
As others have said, it's working now. For the actual reason:
Just wait a little while.
This error comes up on Dreamhost when you make some kinds of edits–in your case see the "DNS changes" heading for a detailed explanation–and they haven't fully resolved yet. If it lasts more than a couple of hours, then you should file a support request, because ...
2
Sadly it is not possible since this is controlled by the browsers. By default browsers will connect to port 80 and anything else needs to be added in the URL.
There is 3 solutions I can think of what could work but ultimately it will not work for public users since some coding on the clients machines would need to be changed.
Host File Method
You could ...
2
i had simalr problem and suggested answers didn't work for me. then read instructions of installing the application from -wampserver.com.... where it says: warning... you install install Visual C++ 2010 SP1 as shown below.....
WARNING : You must install Visual C++ 2010 SP1 Redistributable Package x86 or x64
VC10 SP1 vcredist_x86.exe 32 bits : ...
2
You can use the .htaccess file to redirect from IP to domain using this code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^555\.555\.555\.555
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Change 555.555.555.555 to match the IP of your server, additionally though you can use canonical urls that will prevent duplicates entering ...
1
Generally, I think its bad practice to deny access based on the user agent, as it could really be spoofed to anything. You also could potentially block legitimate users access.
That being said, based on the apache docs, it appears you are using the correct syntax (http://httpd.apache.org/docs/2.2/howto/access.html)
What exactly is apache complaining about ...
1
This is because you have not setup the SSL for the sub domain foo.example.com and so it uses the www. domain. If you do not want SSL you can simply remove the Virtual Host all together running on port 443, otherwise just add to the configuration the following:
Allow foo.example.com to operate on SSL
<VirtualHost *:443>
ServerName ...
1
This is what a proper reverse proxy should look like:
<VirtualHost *:80>
ServerName sub.domain.org
ProxyRequests Off
ProxyPreserveHost On
ProxyVia full
ProxyPass / http://10.160.1.234:80/
ProxyPassReverse / http://10.160.1.234:80/
ErrorLog /var/log/apache2/error_name.log
LogLevel warn
...
1
The default host that is the one that is first
# Default host (must be first)
<virtualhost *:80>
# I use localhost.localdomain, but any host name not matching later hosts gets handled here
Servername localhost.localdomain
DocumentRoot /home/www/default_site
...
</virtualhost>
<virtualhost *:80>
ServerName ...
1
But let's say you want people from your LAN to have full access, without being prompted for a password. In this scenario we could use:
<Directory /home/www/site1/private>
AuthUserFile /home/www/site1-passwd
AuthType Basic
AuthName MySite
Require valid-user
Order allow,deny
Allow from 172.17.10
Satisfy any
</Directory>
This will ...
1
Works fine for me too:
play.mink7.com Coming Soon!
The DreamHost customer who owns play.mink7.com has not yet uploaded their website or has chosen to leave this holding page active.
If you are the owner of this domain, you'll find your login information contained within the emails sent to you when your account was activated. Once logged in, you'll be able ...
1
I believe it is because the browser is not sending a If-Modified-Since during the Request, right?
Correct.
Do I need to change something in the initial Response headers to make 304s happen?
Yes. If you compare original response headers for those resources that have 304 response code on subsequent requests, you will notice:
All of them located in ...
1
Actually, it is impossible to specify different php.ini files for each virtual host.
However you can change almost anything in the php.ini file by using the ini_set() function:
It allows you to set the value of a given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the ...
1
I had that same issue, and don't know why it is failing either. I was able to work around it using this instead:
<VirtualHost *:80>
ServerName domain.com
ServerAlias *.domain.com
# Redirect 301 / https://www.domain.com
RedirectMatch permanent /(.*) https://www.domain.com/$1
</VirtualHost>
1
Change to this and try it, notice only two VirtualHost
<VirtualHost *:80>
ServerName domain.com
ServerAlias *.domain.com
Redirect permanent / https://www.domain.com/
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/domain/
ServerName www.domain.com
SSLEngine on
SSLCertificateFile ssl.crt
SSLCertificateKeyFile ...
Only top voted, non community-wiki answers of a minimum length are eligible

