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


9

Just as a matter of explanation for future users. Your 000-default.conf file is a catch-all site and should be left alone. It is good for security. It can be frustrating when a site configuration does not work and the default site is served. I get it. Still, leave it alone. Many people are unaware of why the default site exists. Here is a bit of an ...


7

You can use the Include directive to include other config files and split up your main config. # Virtual hosts Include conf/extra/httpd-vhosts.conf You can also use wildcards, so you can have each virtual host in a separate config file and include all without having to modify your main config file: Include conf/extra/vhosts/*.conf Reference: https://...


7

The answer is in the comment: Hosting companies that offer shared accounts typically have a number of sites hosted all on the same IP address using virtual hosts as you've done.. They point the IP address either to a default server page, default site, or an error page. In either case, that does not affect any other site SEO-wise. For clarity redirecting ...


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

One of the biggest changes from Apache 2.2 to 2.4 is the way that permissions for directories are granted. The allow from and deny from syntax is now deprecated in favor of the new require syntax. See Upgrading Apache from 2.2 to 2.4. There is a module mod_access_compat that is supposed to allow you to still use the old syntax. Unfortunately, it didn't ...


4

It is most likely causing an infinite loop as they are the same. The default pages in Apache are index.html and index.htm. If the browser does not request a file name the web server will return one of those files if it finds them. So When you go to http://domain-name.com you are actually viewing http://domain-name.com/index.html just without /index.html


4

This depends on how your network is setup. If you have a central DNS server on your network (as many enterprise business networks have) then you can add a zone record for whatever domain you wish for it to show up as. If you don't currently have a central DNS server you could set one up to achieve what you are after just the same. If both of those options ...


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

You need to make a separate VirtualHost for each port, like so: #assuming you have this in your config NameVirtualHost *:8000 NameVirtualHost *:8001 NameVirtualHost *:8002 NameVirtualHost *:8003 # (...) Listen 8000 Listen 8001 Listen 8002 Listen 8003 # (...) Then each VirtualHost looks like this: <VirtualHost *:8000> ServerName localhost ...


3

Just do it the other way round, instead of redirecting to the domain example.com, tell the server which page to display when a user requests the domain directly. In the .htaccess file you can write (this is the default anyway): DirectoryIndex index.html Now if somebody requests http://example.com the server will actually send back the index.html file, but ...


3

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Should do the trick.


3

There is no penalty for as long as you don't overdo it. Just two domains on same server? Not even near the amount I'd say would be questionable. Two could be coincedence, would be very mean to penalize that. It has a bigger values wether or not you share a lot of domains on 1 IP address, or if you share an IP address with malicious sites. It's just two ...


3

This may be kind of easy! Your: ServerName www.mydomain.com ServerAlias mydomain.com ...is backwards, should be: ServerName mydomain.com ServerAlias www.mydomain.com Also, verify your DNS settings, just in case. You should have: A record for mydomain.com that is an IP address Either a CNAME or A record where: _The CNAME is an alias www....


3

@Cragmuer If all you want to do is host two different directories with separate user authentication, just add another <location> directive to your site config. I will assume that you have your ports.conf file setup correctly but I'll include a sample anyway. An example configuration would look like something like this: /etc/apache2/sites-available &...


2

Your error message references /var/www, not your documentroot. So it would be a more broad stanza that covers whether symlinks are allowed (in / or in /var)


2

I faced a similar issue using mod_rewrite and mod_proxy. https://serverfault.com/questions/296159/need-to-redirect-to-static-url-based-off-of-string-patter-match-in-uri The problem is that you are bypassing .htaccess file with your proxy rule. Meaning if you place your file in your web root it will not be seen since you are proxying / to rootTomcat and not ...


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

First; add port to your ServerName < VirtualHost *:80 > DocumentRoot C:/server/htdocs ServerName localhost:80 < /VirtualHost > Second Chance, give a different name to ServerName and add the ServerName to the windows hosts file, this is located in “C:\windows\system32\drivers\etc\hosts”. Open the file in Notepad and simply add; ...


2

Stick with the same port. Port numbers are only used to initiate a connection, then they are moved to a pseudo-random port that's really high and likely not in use. The data transfer does not happen on port 80 for example. (To test this, run iptraf on your server and then download a large file from another computer. You'll notice that it's probably in the ...


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

Open your webmin Go to servers Go to Apache Webserver Create virtual host Check if it works from Existing virtual hosts and it well look like below:


2

You can use nginx as a load balancer and configurate it to correctly handle the server certificates just as normally would happen. All the configurations are explained in http://www.cyberciti.biz/faq/howto-linux-unix-setup-nginx-ssl-proxy/ Instead of using the self-signed certificates, a purchased one can be used.


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

Few things to try: 1) This could be because you have localhost setup as a hostname which would more and likely trigger the default, check in /etc/hostname or optionally use a FQDN such as web.localhost 2) Another thing to try is putting Default at the bottom rather than top as those higher get more priority. 3) Obvious fix don't use localhost as a vhost :)...


2

Actually, it's hard to say. Google could consider these backlinks as attempts to increase PageRank and thus manipulate search rankings because the websites with the same IP address (the same server) are most probably from the same webmaster or company. However, Google can't say these backlinks are useless for SEO (or can penalize websites) because in ...


2

Your DNS example is missing a few elements. Here is how I would set things up. example.com A 10.0.11.101 www CNAME example.com sub-domain CNAME example.com www.sub-domain CNAME example.com If all are on a single web server, then the web server will take the request header and respond to the request accordingly. In this case, only your parent domain needs ...


2

To restrict the use of foo.bar.sites.example.com you have to place another VirtualHost above the existing one: <VirtualHost *:80> ServerName foo.bar.sites.example.com ServerAlias *.*.sites.example.com # .... </VirtualHost> Now you can block or redirect the access. However it's important that you place it above the other VirtualHost ...


2

I agree with user 'closetnoc' who replied at [2015-Aug-2 00:24:36Z] in response to the original post that wrote "The 000-default.conf site is a catch-all for any request the server does not have a configuration file for". And, I think we can make use of such 'catch-all site' as a last resort to safeguard and to enhance the overall security. The thing I ...


2

So I have many sleeping databases which may use RAM memory What you are calling "sleeping" databases -- databases you are not accessing -- do not consume any meaningful resources on a MySQL server other than the physical disk space they occupy. The "working data set" (tables you are accessing) is kept in memory in the InnoDB buffer pool to the extent ...


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