This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_http [2020/09/02 08:25] val [NGINX] |
сервис_http [2022/01/19 13:20] val [Редирект HTTP на HTTPS] |
||
---|---|---|---|
Line 33: | Line 33: | ||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"> | <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"> | ||
</HEAD> | </HEAD> | ||
- | <BODY> | + | <BODY text="blue"> |
<!-- | <!-- | ||
THis is comment | THis is comment | ||
Line 216: | Line 216: | ||
==== Debian/Ubuntu ==== | ==== Debian/Ubuntu ==== | ||
+ | |||
+ | <code> | ||
+ | root@server:~# cat /etc/apache2/sites-available/mail.conf | ||
+ | </code><code> | ||
+ | <VirtualHost *:80> | ||
+ | ServerName mail.corpX.un | ||
+ | # ServerAlias www.mail.corpX.un | ||
+ | DocumentRoot /var/lib/roundcube | ||
+ | </VirtualHost> | ||
+ | </code><code> | ||
+ | root@server:~# a2ensite mail | ||
+ | |||
+ | root@server:~# apachectl -t | ||
+ | </code> | ||
+ | |||
<code> | <code> | ||
root@server:~# cat /etc/apache2/sites-available/user1.conf | root@server:~# cat /etc/apache2/sites-available/user1.conf | ||
Line 534: | Line 549: | ||
</code> | </code> | ||
+ | ==== Редирект HTTP на HTTPS ==== | ||
+ | <code> | ||
+ | # a2enmod rewrite | ||
+ | |||
+ | # cat /etc/apache2/sites-available/000-default.conf | ||
+ | </code><code> | ||
+ | <VirtualHost *:80> | ||
+ | ... | ||
+ | RewriteEngine On | ||
+ | RewriteCond %{HTTPS} off | ||
+ | RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} | ||
+ | ... | ||
+ | </code><code> | ||
+ | # service apache2 restart | ||
+ | </code> | ||
==== FreeBSD ==== | ==== FreeBSD ==== | ||
<code> | <code> | ||
Line 628: | Line 658: | ||
</code><code> | </code><code> | ||
... | ... | ||
- | <Directory /var/www/html/asterisk> | + | <Directory /var/www/html/phoneconf> |
# AllowOverride AuthConfig | # AllowOverride AuthConfig | ||
Line 849: | Line 879: | ||
} | } | ||
} | } | ||
+ | </code><code> | ||
+ | # ln -s /etc/nginx/sites-available/myapp1 /etc/nginx/sites-enabled/myapp1 | ||
</code> | </code> | ||
- |