Bao gồm các thành phần
CentOS, AlmaLinux, Ubuntu, .Nix operating system |
Apache2 |
PHP >= 7.2 |
MySQL, MariaDB, Percona - with InnoDB support |
Easily configurable mail client (msmtp) |
|
Trình tự cài đặt:
# cd [your_folder_run_kn24]
# wget https://ketnoi24.com/download/env/kn24_env.php
# chown -Rf apache:apache [your_folder_run_kn24]
# mysql -u[username] -p[password]
# CREATE DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Các cổng TCP cần mở:
80 http
443 https
Mở trình duyệt thực thi:
http(s)://[your_ipORdomain]/kn24_env.php
Cho phép quyền trên thư mục cache:
chown -R apache [your_folder_run_kn24]/cache
chgrp -R apache [your_folder_run_kn24]/cache
Cấu hình crontab:
# crontab -e
MAILTO=""
*/1 * * * * php /[your_folder_run_kn24]/process_event/cron_events.php
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@almalinux ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Add crontab
Add crontab
|
[root@almalinux ~]# crontab -e
MAILTO=""
*/1 * * * * php [path_to_your_web_folder]/process_event/cron_events.php
|
Install msmtp
Install msmtp
|
First we need the awesome program called msmtp to route all the server's mail through a standard SMTP server.
[root@almalinux ~]# sudo yum install msmtp
[root@almalinux ~]# groups msmtp
[root@almalinux ~]# useradd msmtp
[root@almalinux ~]# sudo mkdir 0777 true /var/log/msmtp
[root@almalinux ~]# sudo touch /var/log/msmtp/msmtp.log &
[root@almalinux ~]# sudo chown msmtp:msmtp /var/log/msmtp/msmtp.log &
[root@almalinux ~]# sudo chmod 0777 /var/log/msmtp/msmtp.log
|
Edit php.ini config sendmail_path with msmtprc |
[root@almalinux ~]# vi /etc/php.ini
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@almalinux ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@almalinux ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@almalinux ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@CentOS ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Add crontab
Add crontab
|
[root@CentOS ~]# crontab -e
MAILTO=""
*/1 * * * *cphp [path_to_your_web_folder]/process_event/cron_events.php
|
Install msmtp
Install msmtp
|
First we need the awesome program called msmtp to route all the server's mail through a standard SMTP server.
[root@CentOS ~]# sudo yum install msmtp
[root@CentOS ~]# groups msmtp
[root@CentOS ~]# useradd msmtp
[root@CentOS ~]# sudo mkdir 0777 true /var/log/msmtp
[root@CentOS ~]# sudo touch /var/log/msmtp/msmtp.log &
[root@CentOS ~]# sudo chown msmtp:msmtp /var/log/msmtp/msmtp.log &
[root@CentOS ~]# sudo chmod 0777 /var/log/msmtp/msmtp.log
|
Edit php.ini config sendmail_path with msmtprc |
[root@CentOS ~]# vi /etc/php.ini
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@CentOS ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@CentOS ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@CentOS ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@Ubuntu ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Add crontab
Add crontab
|
[root@Ubuntu ~]# crontab -e
MAILTO=""
*/1 * * * * php [path_to_your_web_folder]/process_event/cron_events.php
|
Install msmtp
Install msmtp
|
First we need the awesome program called msmtp to route all the server's mail through a standard SMTP server.
[root@Ubuntu ~]# sudo yum install msmtp
[root@Ubuntu ~]# groups msmtp
[root@Ubuntu ~]# useradd msmtp
[root@Ubuntu ~]# sudo mkdir 0777 true /var/log/msmtp
[root@Ubuntu ~]# sudo touch /var/log/msmtp/msmtp.log &
[root@Ubuntu ~]# sudo chown msmtp:msmtp /var/log/msmtp/msmtp.log &
[root@Ubuntu ~]# sudo chmod 0777 /var/log/msmtp/msmtp.log
|
Edit php.ini config sendmail_path with msmtprc |
[root@Ubuntu ~]# vi /etc/php.ini
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@Ubuntu ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@Ubuntu ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@Ubuntu ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@Ubuntu ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@Ubuntu ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@Ubuntu ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@Ubuntu ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@almalinux ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Config SMTP account information
Config SMTP account information
|
Edit php.ini config sendmail_path with msmtprc |
[root@almalinux ~]# vi /etc/php.ini
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@almalinux ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@almalinux ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@almalinux ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@almalinux ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@CentOS ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Config SMTP account information
Config SMTP account information
|
Edit php.ini config sendmail_path with msmtprc |
[root@CentOS ~]# vi /etc/php.ini
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@CentOS ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@CentOS ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@CentOS ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@CentOS ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
VirtualHost for http (vi and save)
VirtualHost for http (vi and save)
|
[root@ubuntu ~]# vi /etc/httpd/conf.d/ketnoi24.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Config SMTP account information
Config SMTP account information
|
Edit php.ini config sendmail_path with msmtprc |
[root@ubuntu ~]# vi /etc/php.ini
;sendmail_path = /usr/sbin/sendmail -t -i
sendmail_path = "/usr/bin/msmtp -t -i"
|
Config SMTP account information |
[root@ubuntu ~]# vi /etc/msmtprc
# smtp account configuration for default
account default
logfile /var/log/msmtp/msmtp.log
host smtp.gmail.com
port 587
from [@gmail.com]
keepbcc off
auth on
user [@gmail.com]
password [textpassword]
tls on
tls_certcheck off
|
Test sent mail |
[root@ubuntu ~]# echo "Hello this is sending email using msmtp" | msmtp -a default recipent@domain.com
|
|
Firewalld open port
Firewalld open port
|
[root@ubuntu ~]# sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
[root@ubuntu ~]# sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
[root@ubuntu ~]# sudo firewall-cmd --zone=public --add-port=22/tcp --permanent
[root@ubuntu ~]# sudo firewall-cmd --reload
|
Config domain name
Config domain name
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain]
Open browser on Window OS
http://[your_ip_server] or http://[your_domain]
|
|
SSL extension configuration
SSL extension configuration
|
On server AlmaLinux OS:
- VirtualHost for https (vi and save)
[root@ubuntu ~]# vi /etc/httpd/conf.d/ketnoi24.ssl.conf
<Directory "/var/www/html">
AllowOverride All
</Directory>
<VirtualHost *:443>
DocumentRoot /var/www/html/ketnoi24
ServerName [your_domain]
ServerAlias www.[your_domain]
SSLEngine on
SSLCertificateFile [path_ssl]/fullchain.pem
SSLCertificateKeyFile [path_ssl]/privkey.pem
<Directory "/var/www/html/ketnoi24/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteRule /mywss ws://[your_domain]:8090/process_chat/php-socket.php [P,L]
</VirtualHost>
|
Restart httpd |
root@almalinux ~]# sudo systemctl restart httpd
|
if you have domain and DNS point to ip server |
If you don't have domain, need add alias on Window |
Open browser on Window OS: https://[your_domain] |
Add new line below to file C:\Windows\System32\drivers\etc\hosts
[ip_your_server] [your_domain] www.[your_domain]
Open browser on Window OS: https://[your_domain] |
|
|