Golthana Posted May 11, 2016 Posted May 11, 2016 (edited) А как корректно перевести ЛК и сам Биллнг на https, чтобы при этом переадресация для должников работала? Сейчас есть только два поддомена для личного кабинета и биллинга. В апаче не силен, потому решил сначала спросить, чтобы не натворить делов. Кстати, сертификаты тоже есть Edited May 11, 2016 by Golthana
Golthana Posted May 11, 2016 Author Posted May 11, 2016 Да. Это я читал, но при этом перестает работать переадресация. Я подключил в httpd.conf vhosts там прописал виртуалзост для биллинга и ЛК, в биллинг заходит, а вот для ЛК ничего не работает. Скорее всего у меня просто неправильная настройка apache
John_Doe Posted May 11, 2016 Posted May 11, 2016 Это я читал, но при этом перестает работать переадресация Кого куда переадресовываете и как?
oberon85 Posted May 11, 2016 Posted May 11, 2016 Скорее всего у меня просто неправильная настройка apache Так покажите настройки апача, все летает. Кстати что у вас за сертификаты?
Golthana Posted May 11, 2016 Author Posted May 11, 2016 Кого куда переадресовываете и как? Все согласно мануалу Кстати что у вас за сертификаты? WoSign
Golthana Posted May 11, 2016 Author Posted May 11, 2016 # Virtual Hosts## Required modules: mod_log_config# If you want to maintain multiple domains/hostnames on your# machine you can setup VirtualHost containers for them. Most configurations# use only name-based virtual hosts so the server doesn't need to worry about# IP addresses. This is indicated by the asterisks in the directives below.## Please see the documentation at# <URL:http://httpd.apache.org/docs/2.4/vhosts/># for further details before you try to setup virtual hosts.## You may use the command line option '-S' to verify your virtual host# configuration.## VirtualHost example:# Almost any Apache directive may go into a VirtualHost container.# The first VirtualHost section is used for all requests that do not# match a ServerName or ServerAlias in any <VirtualHost> block.#<VirtualHost *:80> ServerAdmin admin@uginternet.ru DocumentRoot "/usr/local/www/apache24/data/billing" ServerName billing.uginternet.ru ServerAlias www.billing.uginternet.ru# ServerAlias www.dummy-host.example.com ErrorLog "/var/log/httpd-error.log" CustomLog "/var/log/httpd-access.log" common <Directory "/usr/local/www/apache24/data/billing"> AllowOverride All Order allow,deny Allow from all </Directory></VirtualHost><VirtualHost *:80> ServerAdmin admin@uginternet.ru DocumentRoot "/usr/local/www/apache24/data/billing/userstats" ServerName cabinet.uginternet.ru ServerAlias www.cabinet.uginternet.ru ErrorLog "/var/log/httpd-error.log" CustomLog "/var/log/httpd-access.log" common <Directory "/usr/local/www/apache24/data/billing/userstats"> AllowOverride All Order allow,deny Allow from all </Directory></VirtualHost>
Golthana Posted May 11, 2016 Author Posted May 11, 2016 <?php function rcms_redirect($url, $header = false) { if($header){ @header('Location: ' . $url); } else { echo '<script language="javascript">document.location.href="' . $url . '";</script>'; } } $userip=$_SERVER['REMOTE_ADDR']; if (strpos($userip,'172.172.')===false) { rcms_redirect("http://172.20.0.1/billing/userstats"); } else { rcms_redirect("http://172.172.0.1/uhw/"); } ?> Вот редирект
oberon85 Posted May 11, 2016 Posted May 11, 2016 Это я пока 80 порт пытаюсь настроить То есть редирект не работал и на 80 порту? Тогда причем тут https?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now