S
S
Sergey Beloventsev2018-03-16 11:00:28
Nginx
Sergey Beloventsev, 2018-03-16 11:00:28

Why don't all ubuntu hosts start up?

Two apache2 and nginx servers are installed on ubuntu 16.04, but for some reason some virtual hosts stopped working. here are actually virtual hosts
working apache

<VirtualHost *:8181>
    ServerAdmin [email protected]
    ServerName onepage.lc
    ServerAlias www.onepage.lc
    DocumentRoot /var/www/onepage.lc/web
    ErrorLog /var/www/error.log
    CustomLog /var/www/access.log combined
    <Directory /var/www/onepage.lc/web>
    Options Indexes FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

nginx
server {
    server_name     onepage.lc www.onepage.lc;
    listen 80;
    listen [::]:80;
    root /var/www/onepage.lc/web;
    access_log  /var/www/nginx-access.log;
    error_log  /var/www/nginx-error.log;
    index index.php index.html;
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
 		}
    location / {
        try_files $uri $uri/ /index.php?$query_string;
        }

}

here is not working apache
<VirtualHost *:8181>
    ServerAdmin [email protected]
    ServerName yii2viber.dev
    ServerAlias www.yii2viber.dev
    DocumentRoot /var/www/yii2viber.dev/frontend/web
    ErrorLog /var/www/error.log
    CustomLog /var/www/access.log combined
    <Directory /var/www/yii2viber.dev>
    Options Indexes FollowSymLinks Includes
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

here is nginx
server {
    server_name     yii2viber.dev www.yii2viber.dev;
    listen 80;
    listen [::]:80;
    root /var/www/yii2viber.dev/frontend/web;
    access_log  /var/www/nginx-access.log;
    error_log  /var/www/nginx-error.log;
    index index.php index.html;
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
 		}
    location / {
        try_files $uri $uri/ /index.php?$query_string;
        }
}

when entering the cremea.lc address, it redirects to the cremea.lc address; when entering yii2viber.dev, I switch to the address https://yii2viber.dev (this is nginx) to Apache http://cremea.lc:8181, that is, it is not clear why then redirects to https . The only question is why? Could you tell.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question