General :: Redirect Apache (mod_rewrite) From Subdomain To Https Directory (vhost)?
May 1, 2011
On one of my servers (Centos 5.5), I have been hosting articularly complex CRM application for one of my clients. Recently they have asked about configuring SSL connections to the CRM. Problem is, SSL is already configured for their main domain but not the sub-domain where the CRM application is accessed. Rather than purchasing another SSL certificate for their sub-domain (and probably another IP address),ld it be possible to setup a redirection from the subdomain to a sub-directory in the SSL directory using mod_rewrite. I have searched online and through the other posts on LinuxQuestions but nothing I have tried works.For example:[URl]
View 2 Replies
ADVERTISEMENT
Nov 23, 2010
I was wondering if it is possible to have different certificates for different directories in a https-directory ?So what I want is that for a specificry a specific TLS-certificate is needed by the http-client to be authorized to the directory.Directory /var/www/html/secure/1 needs a certificate A.Directory /var/www/html/secure/2 need a different certificate B.So I have 1 CA, which signs the other certificates of the specific directory. The http-client gets the certificate A or certificate B (to be authenticated for secure/1 of secure/2)
View 5 Replies
View Related
May 4, 2011
just wondering, if i type in a url like this:
how can i get it to direct to:
View 1 Replies
View Related
Jun 4, 2011
I have a website example.com, serving pages on port 80. I want the url example.com/redmine to be rewritten to port 3000, where my redmine server is running, without actually changing the URL. So the user typing in example.com/redmine/test would serve up example.com:3000/test, without the user actually connecting through the port. I know this can work through CPanel, but I don't know exactly how it was implemented. I'm looked at how mod_proxy, mod_proxy_html, and mod_rewrite,
View 4 Replies
View Related
Sep 13, 2010
I have a debian server default installed and i am trying to get cross subdomain session to work. I used this code to test on 2 subdomains
<?php
session_set_cookie_params(0 , '/', '.domain.ltd');
session_start ();
[code]....
View 1 Replies
View Related
Jun 27, 2011
I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04. I added the following to the bottom of my apache2.conf:
RewriteEngine: On
RewriteRule: ^/$ /test [L]
The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it.
View 3 Replies
View Related
Jun 1, 2010
I want to enable Pretty URLs in Concrete5 and Joomla CMSs. So far I have- enabled pretty urls in the CMS- created .htaccess files (as they showed)- changed AllowOverride None to All in /etc/Apache2/httpd.conf <directory>- restarted ApacheBut the pretty urls still don't work, When I click any link on either site it gives me a page not found error. If I use the "non-pretty" URLs, all the links work. So I guess Apache either doesn't read the httpd config file or it doesn't read the .htaccess files or something else. Has anyone got this working? What else did you do?
View 9 Replies
View Related
Mar 7, 2011
For some of the files that I share using Apache, I want to make sure that they are served ONLY via https.
How can I configure this for Apache?
View 1 Replies
View Related
Jun 25, 2010
After Ubuntu autoupgraded my Apache, some VHosts are nor working anymore and PHP Code is not oarsed any longer. I think the apache2.conf was overwritten. I do not have a clue how ti fix that, I tried some things but now I am stuck. I have only three hosts: the default, an svn (over port 443) and one called "imcar" which has PHP scripts to be parsed.
So, in my apache2.conf I have this:
Code:
DocumentRoot /var/www
ServerName localhost
The imcar host is set up like this:
Code:
<VirtualHost *:80>
ServerName imcar
ServerAdmin webmaster@imcar
DocumentRoot /var/www/imcar
<Directory /var/www/imcar>
Options FollowSymLinks Indexes
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/imcar-error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
If I go to imcar in the browser, the default DocumentRoot is shown. If I remove the default DocumentRoot, I get a 404 on imcar.
View 8 Replies
View Related
Jul 21, 2010
I read that since httpd 2.2.12 (I run 2.2.15), it is now possible to run multiple SSL certs on multiple vhosts on one ip. I didn't find a procedure to do it. Do you know how to?
View 1 Replies
View Related
Mar 18, 2011
I would like to set up apache so that:
[code]....
Is it possible with only 1 IP or do i need 2 IPs? I have tried several configurations, but they always seem to lead to a dead end with either the IP-site or the domain-sites not working. There has to be a right way to do this.
View 3 Replies
View Related
Mar 17, 2011
I am trying to add a second vhost to my once working apache config. Now I have things really bollixed up and cannot access anything. I am getting a error 400. The access log shows this:
192.168.0.2 - - [17/Mar/2011:11:24:41 -0400] "GET /" 400 951
192.168.0.2 - - [17/Mar/2011:11:24:41 -0400] "GET /" 400 951 "-" "-"
I have a default (I think) httpd.conf file and put all my config stuff in files in vhosts.d. I have 3 files there:
[Code]...
View 14 Replies
View Related
Aug 23, 2009
I'v multi v-host . need to make each V-Host work under separate user (not apache user).
There is one module/patch call " mpm-itk " . In Debian/Ubuntu every thing is sweet
just do
apt-get install apache2-mpm-prefork libapache2-mod-php5 or aptitude install apache2-mpm-itk
that is all
But in CentOS 5.3 , there is always some difficult different (Why ? I do not know)
Kindly, Look to this solutions : [URL]
Is there possibility to avoid this complications ?
- I need solution without compiling + patching the apache , Is this possible ?
View 1 Replies
View Related
Jan 22, 2010
I would like to use mod_rewrite to rewrite all instances of .php and _ in file names in the root directory
So far I have:
But this throws out error 500. Could someone correct my code?
View 1 Replies
View Related
Jan 6, 2010
Here my setup of Apache :
I have two virtual hosts on separate IP and on both I am using port :80 one is main website domain.name and another webmail.domain.name. And to get full link path I am using index.html with redirection derectives. My question how I can setup each Vhost to he is own redirection directive to set two full link like:
when type webmail.domainname -----> redirect to webmail.domainname/horde/imp/file.php
and www.domainname ------> redirect to www.domainname/csr/
Right now working only one of this Vhosts, just problem to separate them when I type www.domainname -----> apache redirect to webmail.domainname.
index.html
<html>
<head>
<title>WebSite</title>
<meta http-equiv="REFRESH" content="1;url=http://www.domainname/csr/"></HEAD>
<BODY>REDIRECTION</BODY>
</HTML> .....
View 8 Replies
View Related
Mar 16, 2011
This is where it starts: I have 2 networks. The first: 192.168.1.0/24 composed by the router which has access to the internet with the IP 192.168.1 and the server (who is a gateway) with the IP 192.168.1.42 The other network: 192.168.2.0/24 composed by the gateway with the IP 192.168.2.1 and the clients (on the 192.168.2.0/24 subnet). To sum up, the gateway has 2 IPs (192.168.1.4(eth0) and 192.168.2.1(eth1)). On this gateway, I have squid installed (and listening on port 3128). I also made a redirection to redirect some computers who want to access to the web (port 80) to squid (port 3128) with this command: /sbin/iptables -t nat -A PREROUTING -m mac --mac-source CLIENT_MAC -p tcp -m tcp --dport 80 -j REDIRECT --to-port 3128
At this stage, everything works fine. The clients can access the web by the proxy without "knowing". What I wanted to do, is redirect also the port 443 (HTTPS). Actually, when a client wants to access to, for example, [URL]. He cannot. So I would want to be able to redirect people (without passing by any proxy) directly to google. Like a NAT. But the problem is that I can't. The thing would be to, in the gateway, take all the packets with port 443 in destination and handle them to the router 192.168.1.1. Then, when the router sends the packet back, the gateway takes the packet and handles it to the client. I tried putting ip_forward to 1, but the problem is that all IPs and ALL PORTS are forwarded. And I just want port 443 to be forwarded.
View 4 Replies
View Related
Apr 17, 2010
How to redirect one website to another website in apache.
For example: when i type www.example.com in my browser then it redirect to www.example.com/beta. so how i do in apache, i am using centos 5.
View 1 Replies
View Related
Apr 6, 2011
I need to redirect all http/https/ftp traffic through the remote proxy, but when I changes connection settings in browser or in System->Preferences->Network Proxy it doesn't work well: instead of getting page content browser asks for saving some short (8 bytes) file with the same content for all requested pages. It happens in Chrome/Opera/Firefox. This proxy requires authorization and works on computer with Windos XP. It worked well when I was using Windows 7 and Proxifier, now I have Ubuntu 9.10 with all available updates.
View 3 Replies
View Related
Sep 24, 2010
I have two sites (actually more) configured in apache2. All sites have their own vhost file, which I enable or disable with a2enmod or a2dismod.
This works fine.
I have configured some SSL sites inside the vhost files, where I have created two different certificates. One for each site.
BUT, if I enable example2.com, it will always load the certificate from webmail.example1.com when i go to the ssl site webmail.example2.com, nomather what (because it comes first in the alphabet maybe) ?.
If I then uncomment the SSL site for example1.com if will work fine with webmail.example2.com, but of course then the site for webmail.example1.com is not working since it is uncommented.
So for some reason, it "falls back" to this site webmail.example1.com everytime, which I have absolutely no idea why it does this. All the other vhost running on port 80 configurations, works fine, but just not the SSL (port 443 ones).
Example1.com:
Code:
<VirtualHost *:80>
DocumentRoot /home/example1com/wwwroot/
ServerName www.example1.com:80
ServerAlias example1.com:80
[Code].....
View 2 Replies
View Related
Jun 15, 2011
I have a URL that I'm trying to redirect back to the homepage on my site. For some reason since it contains hex I can't seem to get it to work.
A sample source URL is:
[url]
The destination URL is:
[url]
I've tried many different things to no avail.
Some things include:
Redirecting source URLs with REG_LOGINfromURL will get me what I need. Some of my examples work when the source URL does not contain enconded characters, so if the URL was instead [url] it would redirect.
I'm running RHEL 4 and Apache/2.0.52.
View 2 Replies
View Related
Jun 20, 2011
I've set my document root directory in httpd.conf to the directory I want to serve files out of, and set Options to Indexes FollowSymLinks; I've saved the configuration file and restarted apache, yet when I direct my browser to the domain name that's seated there, I can't get at my index.html which exists there. It serves index.html when it exists in the natural document root.
View 8 Replies
View Related
Aug 11, 2011
*Am trying to configure on machine ?MyServer.net? apache on port 8586. *Two applications run on same machine on different ports Jenkins on 8081 and Hudson on 8080.*Request coming to 8586 port should redirect to either 8080 or 8081 on one condition. *The request from client machine coming to MyServernet:8586 looks something like this ?MyServer.net/job/<JOBNAME>/build?token=TOKEN?.
Condition
If <JOBNAME> is ?naveen? apache should redirect to 8081.
If <JOBNAME> is not ?naveenn? apache should redirect to 8080.
[code]...
View 1 Replies
View Related
Jun 22, 2011
My /var/database/ directory is filled..!
Is there any way to redirect some databases to another directory .
View 4 Replies
View Related
Jun 25, 2010
how to redirect all client http request to https request in squid
View 1 Replies
View Related
Apr 11, 2011
I am trying to get name based virtual hosts all running on HTTPS (port 443) so I can run multiple sites on the one IP.
The DocumentRoot needs to be different for each host.
[URL]
However, I am unable to find where to actually enable these hosts in the configs. The apache website says to put it in httpd.conf however that file is empty on my machine.
The existing default virtual hosts are in "/etc/apache2/sites-available/default" and "default-ssl"
The main config file is /etc/apache2/apache2.conf
I am running version 2.2.16 of apache
I need to use the same .htpasswd file for all the sites.
I have configured CNAMES on my domain for all of these hosts.
View 4 Replies
View Related
Apr 1, 2010
I have configured apache using mod_jk to front tomcat. Then I configured tomcat and my application to use https. but after that I cannot access it through https without adding port 8080 in the URL. I think I need to add some configurations to apache to cope with this situation, but I still couldn't find the proper config though I tried many.
View 4 Replies
View Related
Nov 3, 2010
For some years now I have been able to use openssl (apache-mod_ssl) to process encrypted traffic because I had, in effect, only one host - the main server - as the sole entry in our ssl_vhost.conf file.
Now we are working toward serving a couple of more secure sites for closely related organizations, but with their own distinct identities. This, in the past, would have meant additional static IPs with matching nic cards for starters. But my understanding is that since 2007/8 we have been able to use gnutls (apache-mod_gnutls) which gets around the old problem of Apache not being able to direct name-based traffic because that would not yet have been decoded. This is referred to as SNI - Server Name Indication.
Here my confusion begins. Is there an overlap between SSL and TLS? For instance, I would have generated RSA keys and a self-signed certificate with the genrsa command. Is this sufficient for gnutls or does it need to generate its own keys and certificates? I realize gnutls is relatively a new kid on the block but it is appealing and I'd like to give it a try.
I am working with the Mandriva/Mageia cooker with an x86_64 architecture so all packages are up-to-the-minute.
View 3 Replies
View Related
Jul 29, 2009
http://test1.ch is the main page [url]is the sub page(alias) in another language(italian)
So that means every request on [url] should be redirected to [url]
I already tried: redirect permanent [url] but nothing happens
View 1 Replies
View Related
Oct 30, 2015
How to best manage both http and https pages on the same apache-server without conflicts. For example, if i have both 000-default.conf and 000-default-ssl.conf pointing to mydomain.com, and don't want users who visit mydomain.com without specifically type the https-prefix to be redirected to the https-page - how to handle users using browserplugins such as https-everywhere etc?
Another option would be to create a subdomain ssl.mudomain.com and have users who want to reach the ssl site to have to type ssl. I have tested several things with https everywhere enabled in my own browser, and it seems really hard to make this working the way i want, in one way or another i always end up getting redirected to the ssl-site automatically.
The reason i need this to work is because i run one site that i don't care much about SSL, that is the "official" part of that site, and i also host some things for friends and family on the SSL-part. This would not have been a problem if it wasn't that i use self-signed certificates for my ssl-site and the major user become afraid when a certificate-warning pops up in their browser and therefor leave the site.
View 2 Replies
View Related
Jan 17, 2010
I have 2 web server in my office : http and https. You will find attached the httpd.conf and ssl.conf. I can acces the https server from home, but not the http one.
What I did :
configure the router to forward port 80 to my fedora 11 machine
open port 80 with system-config-network
created a virtualhost
The same exact steps have been done for port 443
I can access both server locally but only the https server remotelly.
Here are my iptables :
Code:
you can try to acces my servers using [url]
I made httpd to listen to port 8080, and done all the port forwarding/opening stuf, and it works. so is it a bug ?
Finally found my error seams like turning off UseCanonicalName to off did the trick
I really think it's a bug now. It was definitively working last week, I just added content to the main host of my website, and now i can't acces it from port 80. If someone think it's not a bug or find someting missing/wrong in my conf file.
View 2 Replies
View Related