Connecting SFTP Public Keys for Authentication
https://winscp.net/eng/docs/public_key#private Run SFTP Client on your computer as normal. Using Public Keys for Authentication, you don’t need to use password any more. Enter server Hostname, username, then click on “Advanced” button. Then add the PrivateKey file using SSH=>Authentication. Please Save and login to SFTP. Once you’re on GC, please look for /var/www/html/. By default, it’ll redirect you to /home/YourUserName/ directory.
CentOS folder permission ftp user and apache on GoogleCloud
You can use access control lists commands. First set owner apache to the directory sudo chown -R apache:apache /var/www/public_html/test Now set acl so that ftp user can upload folders. FOR USER sudo setfacl -R -m u:YourUserNameHere:rwx /var/www/public_html/test FOR GROUP sudo setfacl -R -m g:UsersGroupNameHere:rwx /var/www/public_html/test
file_get_contents in php7
If file_get_contents($url) generates error “Warning: file_get_contents(…) failed to open stream: Invalid argument in”, use this curl function below.
Configure VHost on Windows with Bitnami
1) Configure VHost of windows first by editing this file C:\Windows\System32\drivers\etc\hosts 127.0.0.1 localhost 127.0.0.2 test1.yourdomain.com 127.0.0.3 test2.yourdomain.com 2) Configure Bitnami VHost by editing this file C:\Bitnami\wampstack-7.0.16-1\apache2\conf\bitnami\bitnami-apps-vhosts.conf Add as many virtualhosts as you need. VirtualHost test1.yourdomain.com:8070 DocumentRoot “C:/Users/you/Documents/_www_php70/ws” Directory “C:/Users/you/Documents/_www_php70/ws” Options Indexes FollowSymLinks AllowOverride All IfVersion < 2.3 Order allow,deny Allow from all /IfVersion IfVersion >= 2.3 Require all granted /IfVersion # Error Documents ErrorDocument 503 /503.html # Bitnami applications installed with a prefix URL (default) Include “C:/Bitnami/wampstack-7.0.16-1/apache2/conf/bitnami/bitnami-apps-prefix.conf” /VirtualHost
Bitnami Delay
You’ll need to stop Cache Completely to increase the response time on Bitnami server. Edit php.ini file and change option opcache.enable=0. Zend OPCache is enabled by default when you install Bitnami on Windows.