13

For wamp 2.5 on Windows, use a text editor, e.g. notepad++ to edit c:\wamp\bin\apache\apache2.4.9\conf\httpd.conf Change DocumentRoot "c:/wamp/www" to DocumentRoot "c:/my/new/path" (Note slash direction). This will change the location where files are served from (~Line 230). Change <Directory "c:/wamp/www"> to <Directory "c:/my/new/path"> (Note ...


7

Edit the httpd.conf file and/or the vhosts.conf file for the site wish to change. The Directory directive will let you specify where the files for this site are to be located. For more info on httpd.conf see: http://httpd.apache.org/docs/2.2/configuring.html And specifically: http://httpd.apache.org/docs/2.2/mod/core.html#directory


6

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 a ...


5

Click on Green Wamp Icon (Taskbar right Notification Icons) > Apache > httpd.conf > Replace all ${INSTALL_DIR}/www with your directory. Take care to use / instead of \ Click on Green Wamp Icon > Apache > httpd-vhosts.conf > Replace again the existing "www"-Directory with yours Click on Green Wamp Icon > "Restart All Services" (Tested on Windows 10, ...


5

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 ...


5

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 ...


4

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

I found these simple steps helping, Click on WampServer icon in taskbar Select Apache > httpd.conf from the pullup Search for the term “DocumentRoot” Change the DocumentRoot path to your custom directory Search for your DocumentRoot path again same procedure Save your changes and “Restart All Services”


3

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 ...


3

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 /...


3

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 ...


3

You'd do best to go ahead and change the servername inside httpd.conf, something like the below code. Make sure it is a non-alpha name, just normal text. <VirtualHost *> ServerName your_server_name DocumentRoot /var/www <Directory /var/www> AllowOverride All Options All </Directory> </VirtualHost>


3

loading that file displays the php source instead With syntax highlighting. The same as if you had called PHP's highlight_file() function on that file. It's just a feature if you need to quickly document some code. Many sites display syntax highlighted code on their blogs etc. PHP has this built-in if you need it. If you don't need it, remove it. could ...


3

The problem that you have is because you have not abled AllowOverride All within the SSL virtual host which allows the use of .htaccess which I suspect contains the URL rewrite rules and conditions. Add this code to your SSL virtual host: # START NEW CODE <Directory /var/www/html/joomla> Options FollowSymLinks MultiViews Options -Indexes ...


2

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 ssl....


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 : http://www....


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

After doing the above, you can also change the: in the of wamp directory (wampmanager.ini, wampmanager.conf). php.ini my.ini Save your changes and close Wampserver.


2

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 foo.example....


2

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 www....


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 ...


2

Apache applies configurations for directories to a request from smallest to largest. In essence the <Directory /> section specifies virtual host defaults; since every other possible directory will have that portion in its path. If multiple (non-regular expression) sections match the directory (or one of its parents) containing a document, then ...


2

Not all servers use httpd.conf, but all have some type of configuration file. If you're using apache, the httpd.conf configurations can be overriden through .htaccess file in the root web directory unless overrides are turned off in httpd.conf See: http://httpd.apache.org/docs/2.2/howto/htaccess.html


2

From What are the most commonly used and basic Apache htaccess redirects? contributed by bybe: Catch all and redirect non-www to www You should opt to use mod_write for redirecting all requests for non www versions of your site because the $1 varible will catch page names, so example.com/page1/ will automaticly redirect to www.example.com/page1/. ...


2

The first virtual host directive is the default "catch all." Any unrecognized host names get handled by whichever virtual host directive comes first. The solution to your problem is to create a default virtual host directive that prints out an error. I have one that I use. I've previously posted it in this answer 404 Not Found -- Hostname Not ...


2

Let me make your question a little simpler.. :) What ? Send 200 response instead of 304 How ? Just add this configuration in your Apache setup. <filesMatch "\.(xml)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-...


2

it looks quite similar to PCRE syntax Yes, many of the parameters to Apache directives do take regular expressions (regex) and the "flavour" of regex used is indeed PCRE. This applies to mod_rewrite and in fact any other Apache module that uses regex. There are some minor differences (and additions) in the syntax used by Apache, but this is primarily ...


2

The CustomLog directive allows you to set a condition (in an optional 3rd argument) that is used to control when the request is logged. (On Apache 2.4+ this can take the form of an Apache Expression.) However, this condition is generally based on a property of the request (file type, request header, etc.), rather than something that is associated with the ...


2

Just to clarify usage... you can only have one ServerName directive. If you have more than one then the later directive simply overrides the earlier one. However, you can have many ServerAlias directives. In terms of resolving the requested domain name (ie. you request www.example.ma and the server is able to match this) it doesn't really matter whether www....


2

The problem is with the line ServerName localhost.localdomain in adorkable.conf. The entire server is running on localhost.localdomain. You should use your actual domain name in your VirtualHost configuration. ServerName example.com If the domain name is not yet pointing to the server you can test by putting it into your /etc/hosts file: 127.0.0.1 ...


Only top voted, non community-wiki answers of a minimum length are eligible