Firstly, my HTTPS site setup using Virtual Host Redirect is working fine. But, after i try to add restrictive SFTP user by target user home directory into web directory of my HTTPS site with the following command
useradd -G crmadmin ftpuser1
usermod -a -G www-data ftpuser1
and then i append following to /etc/ssh/sshd_config
subsystem sftp inteal-sftp
Match User ftpuser1
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand inteal-sftp
I continue run following command
usermod -d /var/www/crmsite ftpuser1
service ssh restart
After that, all of my user sftp access to the server has result connection refused. Then, i undo change made to /etc/ssh/sshd_config. Then, the sftp access of all sftp user is working fine. Then, i find my HTTPS site has down, site not reachable.
After that, i try to run and change home directory of the sftp user and run following command
usermod -d /home/ftpuser1 ftpuser1
My HTTPS site still not reachable. This is my configuration of Virtual Host
<VirtualHost *:80>
ServerName kg.mycrm.com
ServerAdmin [email protected]
Redirect permanent / https://kg.mycrm.com
</VirtualHost>
<VirtualHost *:443>
ServerName kg.mycrm.com
ServerAdmin [email protected]
DocumentRoot /var/www/crmsite
ErrorLog ${APACHE_LOG_DIR}/errorexample.log
Options -Indexes
SSLEngine on
SSLCertificateFile /etc/ssl/example/examplecert.crt
SSLCertificateKeyFile /etc/ssl/example/examplekey.key
</VirtualHost>
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 189
تاريخ: جمعه
14 خرداد
1395 ساعت: 13:22