15

When you type the URL in a web browser, http://www.foo.com, it will always attempt to connect on port 80. It's not so much that the port is being hidden, but rather that it's being assumed, since port 80 is the default for HTTP requests. Along the same line, if you browse to https://www.foo.com, it will always attempt to connect on port 443 unless you ...


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

What will occur depends on how you have setup your web server. A web server may be setup to display an index page - that is a page that is displayed when a directory is accessed. In this case, the server will typically try all the files listed (e.g. index.htm, index.html, index.php, etc) in the order listed, and display the first one that is available, or ...


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

Here is the manual for DNS SRV records (RFC 2782) which can be used to change the default port to match what you actually use: _http._tcp.example.com. IN SRV 0 5 80 www.example.com. where next to last field is port, which can have any real value. DNS SRV records can redefine default http port for domain or only for (some) hosts inside ...


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


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

If wamp is running make sure no other program conflict Wamp such as IIS, Microsoft Web Deploy, SQL, Skype, Zonealarm, firewall/antivirus, NOD32, Eset, any web related program including Remote Desktop, Teamviewer ... IIS and Apache/Wamp are both web server and might conflict in some way, so you have to disable IIS in order for Wamp to work Disable IIS in ...


4

This is probably a silly question, but did you restart your web server process after modifying httpd.conf? Sometimes I forget to do that...


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


4

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


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

The HTTP protocol uses port 80 by default. If you configure your web server to use a nonstandard port, then the port needs to be specified in the URL. There's no way to hide that. In Apache, you can set the listening port in httpd.conf, e.g.: Listen 127.0.0.1:80 This can however be overridden in the vhost config, e.g.: <VirtualHost *:80>


3

In order to work with two names under one site you have Respond from Apache side on both Host request (you done it) Configure DNS for domain in order to have 2 URLs route to the correct host In short: nslookup foobar.com and nslookup www.foobar.com must return answers and answers to be identical Your impression about <Directory> container directive ...


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

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

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


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

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

Depending on the webserver you're running and its configuration, yes. It is very common that index.html is read from the folder the webserver points to if you don't add a filename in the URL. In Apache, for example, these filename(s) are defined in the configuration with the directive DirectoryIndex. In Microsoft IIS default.asp is a common default ...


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


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

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

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

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


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