All Questions
Tagged with redirect virtualhost
74
questions
0
votes
0
answers
41
views
NGINX - redirect userdir to another domain
I had an apache virtualhost config that redirects "http://host.domain.com/~userdir" to another host:
RewriteRule ^/~(.+) http://anotherhost.domain.com/~$1 [R,L]
But I'm having trouble ...
0
votes
1
answer
132
views
Apache vHosts - Two domains, multiple subdomains and defaults possible?
after searching and try-and-erroring for a while I came to the conclusion that my problem is a bit too special for google :-)
I have 2 domains and multiple subs
example.org
cloud.example.org
wiki....
0
votes
1
answer
225
views
Apache2 how to generate random string for subdomain
I want to issue a redirect to a new randomly generated subdomain name for every request I get. Below you can find my vhost configuration. I want to do a redirect towards a subdomain containing some ...
0
votes
1
answer
398
views
Certbot cannot check challenge because of Apache "Redirect / domain.com"
So there is this server that is all messed up but that is besides the point.
I ran certbot and it failed. Checked the vhost for port 80. It has the blanket redirect.
It dose not seem like it would ...
1
vote
1
answer
3k
views
Apache add new site as subdomain on server
I have two sites which runs independently on my VPS, let's call them site1 and site2.
They are respectively located at /var/www/html/site1 and /var/www/html/site2
I don't have a domain name yet but I ...
1
vote
0
answers
561
views
Redirect Permanent in Virtual Host apache configuration behaving not as expected
I have multiple domains pointing to the same IP.
RedirectPermanent works fine for all domains IF and only IF the pages are NOT existing, and I get the 404 default page of my website.
If I type in the ...
0
votes
2
answers
354
views
How to redirect http to https while the other folder stays http?
I have 2 folders, CRM and my_website.
The my_website can be access to https://example.com/ (it will change http to https), while the CRM is http://example.com/crm.
and this is my virtual host
000-...
0
votes
1
answer
458
views
apache2.4 with vhosts & TLS certificates: certificate for wrong vhost presented
I operate a server hosting multiple virtualhosts with apache2.4.
A newly hosted domain (https://www.yachtenwelt.de) is correctly using the respective TLS certificate.
In addition, I have to ensure ...
0
votes
2
answers
237
views
Best method for setting few SSL domains with redirects
I wonder what is "best" and recommended method of setting up SSL domains on single IP, where there are redirects from :80 to :443. This was not entirely covered here, because I need those ...
-1
votes
2
answers
1k
views
Apache redirect with HSTS
I need to redirect all for example.com to https://www.example.com with HSTS turned on. How to do it? I got configuration in vhost80 and vhost443. What to fix in this code:
in vhost 80
RewriteCond %{...
1
vote
1
answer
4k
views
Apache redirect to wrong Vhost while redirecting to https
Problem
Accessing studentmossa.domain.comresults in a redirect to server.domain.com.
Short valuable information
I am running Fedora 31 (kernel 5.5.15-200.fc31.x86_64) with Apache/2.4.43 (Fedora).
...
0
votes
2
answers
541
views
Redirect Apache to a different service in subfolder
I have a CentOS 6.9 server that is running a DokuWiki under Apache/HTTPD 2.2. This wiki is installed in /var/www/html/dokuwiki. Therefore, when you type myserver.com/dokuwiki, it enters the wiki. If ...
1
vote
1
answer
679
views
Apache redirect multiple https domains to one https domain using virtual Hosts
I’m running a CentOS Server with apache 2.4 that serves two domains: myurl.domain.com and myurl.otherdomain.com. Using virtualhosts I want all requests to be redirected to https://myurl.domain.com.
...
0
votes
1
answer
347
views
Stop redirect IP to Domain of a folder
Everytime I try to access to http://server-ip/folder1 it redirects me to http://example.com
I want to access to folder1 but it´s impossible because it's redirected to http://example.com/folder1
...
0
votes
1
answer
177
views
Redirect http and non-www using only mod_alias Redirect, dedup SSL configuration?
This is probably a duplicate but I can't find quite what I'm looking for. I'd like to redirect http and/or non-www to https+www. This is often cited as a canonical example of when to avoid mod_rewrite....
1
vote
0
answers
3k
views
Grafana with SSL and Apache reverse proxy continuously redirects
I am attempting to move my Grafana install from a non-SSL to SSL link. It sits behind an Apache reverse proxy and worked fine before I tried to set up SSL.
I have seen many tutorials that look like ...
0
votes
1
answer
53
views
Apache configuration issue (VirtualHosts and redirection)
I have included virtualhost .conf file into my httpd.conf with the following content:
root@phpbb3:/usr/local/etc/apache24 # cat ./sites-enabled/000-www.domain.com.conf
<VirtualHost *:*>
...
0
votes
1
answer
282
views
How to point one domain to deep page of another domain with apache or htaccess
I have two domains (a.com and b.com) and a.com is running on my apache server. I want web browsers that try to visit b.com to end up at a.com/?b (transparently, no redirect, and no second virtual ...
0
votes
3
answers
2k
views
Apache Virtual Host redirect from https subdomain to subdirectory
How do I redirect requests coming to https://blog.example.com to https://example.com/blog?
Reading the apache docs on when not to use the rewrite mod, I tried a simple redirect e.g.
Redirect https://...
0
votes
2
answers
51
views
A particular sub-domain in a virtual host is not redirecting, but others succed
I like my website to be accessible by example.org or https://example.org not www.example.org.
So I want http://www.example.org to redirect to http://example.org and http://www.example.org to https://...
0
votes
1
answer
3k
views
redirect entire virtualhost to 404 page
I have a few sites hosted on an apache server. Most of them can be accessed via http and https. One of them may only be accessed over http. Attempts to acccess it via https must be redirected to the ...
0
votes
0
answers
108
views
http://sub.site.com is incorrectly redirecting to http://www.sub.site.com instead of https://sub.site.com
Using Apache 2.4.18 on Ubuntu 16.04.2
I have blog.ryangiglio.com set up as a virtualhost. I used the letsencrypt certbot to generate an SSL cert for the server, and set it to force redirects from ...
0
votes
1
answer
332
views
Apache vhost not redirecting
I have a subdomain sub.example.org with an A record showing to my server IP.
On the server I have /etc/apache2/sites-enabled/sub.example.org.conf with
<VirtualHost *:80>
ServerName sub....
1
vote
1
answer
69
views
Nginx fails to direct to https server block on same domain
I'm attempting to serve a static file using nginx over https.
Setup
DNS correctly points subdomain to AWS IP:
subdomain1.website.com -> correct IP
Working config
I've found the following ...
4
votes
3
answers
5k
views
Apache RewriteMap with URLs containing space doesn't work
I am actually using a RewriteMap directive inside my vhost to redirect a list of 800 URLs. It works quiet well:
RewriteEngine On
RewriteMap redirects dbm=db:/data/apps/project/current/configuration/...
0
votes
1
answer
1k
views
Apache configuration - Why I get redirect loop?
I have Apache server and JBoos server with my application on my local computer.
This is my Apache configuration:
httpd.conf
ServerRoot "C:/opt/Apache"
Listen 80
LoadModule actions_module modules/...
1
vote
1
answer
43
views
Redirect alias but not IP
I have a virtual private server under debian 7 .
On this server I have a website accessible at let's say https://www.monsiteweb.fr
My IP adress is let's say 212.227.100.200 and I can acess to ...
0
votes
1
answer
7k
views
Redirect one vhost to another vhost with SSL in Apache
Here is my situation: I have two CNAME domains (domain.one.com and domain.two.com) that point to the same IP/machine and I want to redirect one of the two to the other one, like domain.one.com/...
-1
votes
1
answer
588
views
Apache how to create default host for https
I have several sites on my server. For example: domain1.com and domain2.com.
If user requests a not existing sub-domain (For example: a.domain2.com) he will be redirected to domain1.com. I want to ...
0
votes
2
answers
14k
views
SSL on apache; the requested URL was not found
I am setting up SSL on my Apache/2.4.6 RHEL server. In httpd.conf, have VirtualHosts as shown below...
<VirtualHost *:80>
ServerName foo.bar
Redirect permanent / https://foo.bar
</...
0
votes
2
answers
104
views
Redirect if user uses IP and not (Sub)Domain
I have an Apache server and I want to redirect every user that is connecting to my Website if they don't use a specific Domain, in this case a subdomain.
So if I use the IP I want to get redirected to ...
1
vote
2
answers
306
views
Redirect multiple sites (HTTP and HTTPS) to a single page (ngxin - ubuntu)
I've currently got a floating IP pointing at a server hosting a number of sites, some with SSL, others without.
I need to shutdown, backup and resize said server - and was hoping to setup a simple ...
0
votes
1
answer
54
views
Apache2 simplest redirect not working anymore
I am new at Server configurations, and I´m having a probably weird problem.
I set up a webserver with success, even having a working redirect from http to https.
And now, without knowingly changing ...
0
votes
1
answer
117
views
Debian redirect subdomain to virtualhosts
I am very new to server stuff so please be gentle..
I would like that sub.mydomain.com (from OVH) bring users to http://[ip_address]/~username/ (from KS)
In my registrar, I added A type redirection ...
0
votes
0
answers
127
views
Redirect from within vhost for multiple sites
Note: My question is similar to one here but I'm trying to achieve something slightly different.
A. I would like to create two vhosts on a ec2 instance that has a elastic ip attached.
B. Each of these ...
2
votes
2
answers
14k
views
Redirect all subdomains to main domain inside vhost
I simply want to redirect all subdomains that are not not already mentioned in a vhost's ServerName to redirect to the empty sub domain. I tried to add this to my httpd.conf after all other virtual ...
0
votes
0
answers
123
views
How to avoid redirect loops in apache vhost
I have tried the following setup and get loops:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.example.org
DocumentRoot /var/www/../../../
...
</VirtualHost>
<...
1
vote
0
answers
650
views
Redirecting ServerAlias root to some sub-directory with Apache
I have the following Apache VirtualHost configuration:
<VirtualHost 192.0.2.1:80 [2001:DB8:4007:80d::200e]:80>
ServerName app.example.com
ServerAlias foo.example.com
ServerAlias bar....
1
vote
3
answers
2k
views
ServerName with IPv6 with Apache
I'm basically trying to redirect every request on :443 to :443. I found this way to do that, which work pretty nicely, once the visitor discard the SSL alert (my certificate isn't valid for my IP, of ...
0
votes
3
answers
311
views
Redirect Naked Domain to SSL
I have a wildcard SSL certificate and I want to redirect all http requests to their equivalent https.
My server is a Debian (wheezy) and I am running Apache 2.2.22
I have added the following at the ...
0
votes
2
answers
664
views
Apache redirect seems to ignore ServerName
I have a couple virtual host files. The first one redirects all traffic for http://www.mysite.com to the https version:
<VirtualHost *:80>
ServerName www.mysite.com
Redirect permanent / ...
1
vote
1
answer
67
views
Varnish to Vsites on Apache servers
Can anyone advise of a VCL conf that redirects (inside LAN & LAN DNS) to get to multiple named hosts?
i.e.
http://x.ourdomain.com = IP of Varnish Server = redirects to LAN host (i.e. 10.0.5.1)
...
0
votes
1
answer
12k
views
Apache HTTPS redirect from old domain to new HTTPS Domain
I used to have a domain which used to have a SSL Certificate, it still does have. But I have changed the domain, and I also have a new SSL Certificate for that new domain.
I still have users ...
1
vote
2
answers
172
views
Apache restrict /var/www subdirectories access
I got 2 virtualhosts that are looking at /var/www/site1 (ServerName site1) and /var/www/site2 (ServerName site2). I want to make my sites unavailable by http://1.2.3.4/site1 or http://1.2.3.4/site2 by ...
2
votes
2
answers
925
views
Redirect all URLs to a single URL
I have a machine foo00 whos CNAME is foo. With nginx I can access my site from the following URLs:
foo/
foo00/
foo.domain.local/
foo00.domain.local/
How can I configure nginx so that all are ...
2
votes
1
answer
2k
views
Apache2 Virtual Host redirect except on special path
Assume we have 2 domains.
www.my-domain.com
www.mydomain.com
As Standard, we have a redirection from .mydomain.com/ to .my-domain.com/ via
(mydomain.conf)
<Virtualhost *:80>
ServerName ...
0
votes
1
answer
155
views
Default VirtualHost redirect
I need your help guys.
I have a server running Apache 2 and in there I've multiple vhosts bound to different domains. I want that the default vhost (so every address not bounded with a vhost) ...
-1
votes
1
answer
879
views
SSL works fine, how can I add in https redirection from http?
Hi I'm having major problems with a server, SSL works perfectly when connecting with https://..., I need to set up redirection from http to https.
This is my ssl.conf, CentOS-6, with one IP address. ...
0
votes
1
answer
433
views
Redirection of subdomain working, but server not found error : Linode [duplicate]
Here is my virtual host :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName policy.domain.com
ServerAlias www.policy.domain.com
DocumentRoot /policy
ErrorLog /...
0
votes
1
answer
839
views
No SSL certificate error when configuring redirection in virtual host
My server is working fine with a self-signed SSL certificate until I added the following lines to redirect request containing wwww to non-www site:
<VirtualHost *:443>
ServerName www.mydomain....