Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

subdomain redirect problem


Hi All,
I have http://www.domain.com on 80 port
I have and httpS://sub.domain.com on port 443

The problem is that when i try http://sub.domain.com ... redirect me to http://domain.com ..
I want to forbid http://sub.domain.com ...
how to make only httpS://sub.domain.com works
my conf. file is :

Listen *:80
Listen *:443
NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
ServerName domain.com
<Directory /www/domain>
allow from all
</Directory>
</VirtualHost>

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /path to crt
SSLCertificateKeyFile /path to key
ServerName sub.domain.com
<Directory /www/domain/subdomain>
allow from all
</Directory>
</VirtualHost>

Thanks
View Original Thread
Comments
0
Be the first to comment

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect
avatar
Tags: allow
Redirect on POST with a custom redirect handler?
Jul 7, 2010
I'm looking for a way to handle a redirect on POST, obviously HttpClient doesn't handle them automatically. "HttpClient handles all types of redirects automatically, except those explicitly prohibited by the HTTP specification as requiring user…

Re: Redirect on POST with a custom redirect handler?
Jul 8, 2010
Thanks Sam. We don't control the target server so looks like I'll be doing manual redirect following. --Josh On Wed, Jul 7, 2010 at 4:25 PM, <samcra### @gmail.com> wrote: > If you know/control the behaviour of the target server you…

How to redirect ?
Aug 20, 2010
This is going to be a vey very dumb question, so apologies up front. Using WinAMP with Apache 2.2.11. I need redirections based on host name. Host1, host2 and host3 all are the same server host1 should be staying at host1 at the same port host2…

redirect some requests to another tomcat.
Jun 15, 2010
Hi, I have several applications running on my tomcat server. But due to some reasons i need to move some of these applications to another tomcat server. But most of these applications are client-sever applications and hence i don't have the…

redirect output via command
Aug 12, 2010
Hi All, while I am playing with Apache Common Exec I found out that is it obviously not possible to redirect output into a file via command. I want to exec cksum file > file.chsum.txt. I get the output of cksum in ecplise but it is not written…

Re: redirect output via command
Aug 23, 2010
Hi Thomas, success stories are always welcome ... :-) Cheers, Siegfried Goeschl On 23.08.10 22:09, Thomas Tanneberger wrote: > Hi Siegfried, > > many thx for your advise. The solution is quite simple. You can open a > StreamWriter…

rewrite redirect advise
Aug 20, 2010
hello, i have a drupal site within which there is a folder with wordpress so http://mysite/blog loads the wordpress. i want to take this out completely so the http://blog.mysite is in its own vhost is it possible in for the http://mysite to add a…

Re: [users@httpd] 301 redirect
May 25, 2010
On 19.05.10 00:02, Piotr Kloc wrote: > Can I set the redirect 301 not in .htaccess but in apache conf ? > I have tried to set this > > RewriteEngine on > RewriteRule ^webmail/(.*)$ http://somedomain.com/webmail/$1 [R=301,L] …

Redirect Monit port to Apache2
Jun 23, 2010
Hello, I have a Debian Lenny server with Apache2 and Monit installed, both works great, Apache on port 80 and Monit on port 2812. I want to add the Monit web interface to my server on http://host/monit directory. By default Monit comes on…

OAuth authorization endpoint - conditional redirect
Jul 8, 2010
Hi, When user makes request to authorization endpoint i.e: https://photos.example.net/authorize?oauth_token=hh5s93j4hdidpola I have to check whether oauth_token is valid. If so redirect to user's sign in page, if not redirect to some error page.…