logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: again a problem of http redirection
Author
Minus



Joined: 18 Apr 2016
Posts: 8
Location: France

PostPosted: Mon 18 Apr '16 16:35    Post subject: again a problem of http redirection Reply with quote

HI

I use owncloud 8.1 on debian 8.2 virtual machine

Everything is ok, the https works and the server is on production since november.

My customer can access to my server from outside of my lan with this URL https://cloud.mondomaine.com, but i have one problem:

Some customers forget the "s" de https and write http://cloud.mondomaine.com

When they write http://cloud.mondomaine.com the internet navigator show the url http://cloud.mondomaine.com/ but it really show the welcome page of an another server in my lan who has the url survey.mondomaine.com and don't have the same IP Shocked

I don't know what to do

I tried to change my owncloud.conf file in apache like this and no result:

http://www.hastebin.com/ujunikipuj.apache

and i tried to had this 2 lines in /var/www/owncloud/.htaccess has follow

http://www.hastebin.com/ecufibitec.rb

like this

http://www.hastebin.com/uriwogakir.apache

No result with this 2 modifications

Thank you for your help
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 18 Apr '16 21:29    Post subject: Reply with quote

Are you sure you have Include(d) the owncloud.conf file somewhere like /etc/apache2/apache2.conf ?
Include /path/to/owncloud.conf
Back to top
Minus



Joined: 18 Apr 2016
Posts: 8
Location: France

PostPosted: Tue 19 Apr '16 9:26    Post subject: Reply with quote

Hi

thank you for your help

yes, i'm sure that the file owncloud.conf is on the good location (it's on /etc/apache2/sites-available/ and after i wrote a2ensite owncloud.conf)

ls -l /var/www/
total 8
drwxr-xr-x 2 root root 4096 nov. 17 09:25 html
drwxr-xr-x 13 root root 4096 avril 18 14:34 owncloud

a part of /etc/apache2/apache2.conf

http://apaste.info/jdg
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Sun 24 Apr '16 17:53    Post subject: Reply with quote

Make sure that there is a symlink from

/etc/apache2/sites-enabled/owncloud.conf to /etc/apache2/sites-available/owncloud.conf

to check that you can also use

sudo apache2ctl -S
Back to top
Minus



Joined: 18 Apr 2016
Posts: 8
Location: France

PostPosted: Mon 02 May '16 11:17    Post subject: Reply with quote

hi

sorry for this long silence due to several research concerning my problem.

And now i know what's happening

This is a problem with the proxy of my watchguard's UTM box

if the request is HTTP the proxy redirect to the survey server ip, if the request is HTTPS the proxy redirect to the cloud server ip

And thus this configuration is priority on the Apache configuration

So now i want to know if this configuration is possible with apache:

- if the survey server receive an url http://cloud.mondomaine.com, can it redirect this request to the cloud server (ip: 172.16.0.85)?

This is my survey.conf apache configuration:

Code:
<VirtualHost 172.16.0.81:80>
        ServerName survey.mondomaine.lan
        ServerAlias survey.mondomaine.com
        DocumentRoot "/var/www/html/limesurvey/"
    <Directory "/var/www/html/limesurvey/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog /var/log/apache2/limesurvey-error.log
    LogLevel warn
    CustomLog /var/log/apache2/limesurvey-access.log combin
    ServerSignature Off
</VirtualHost>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 05 May '16 20:58    Post subject: Reply with quote

Do I get it right that the survey.mondomaine.lan shall no longer be available but redirect to the other domain on https?
Back to top
Minus



Joined: 18 Apr 2016
Posts: 8
Location: France

PostPosted: Wed 11 May '16 9:58    Post subject: Reply with quote

NO this is really a problem with de http and https proxy rules of my utm box

If i remove de http proxy snat rule, in local network, the apache redirection rule to https works.

I'm installing an apache reverseproxy server to see if it's solved this problem
Back to top
Minus



Joined: 18 Apr 2016
Posts: 8
Location: France

PostPosted: Wed 11 May '16 11:10    Post subject: Reply with quote

Confirmation that the apache reverseproxy solved my problem

Thank you
Back to top


Reply to topic   Topic: again a problem of http redirection View previous topic :: View next topic
Post new topic   Forum Index -> Apache