熱門文章

顯示具有 PHP 標籤的文章。 顯示所有文章
顯示具有 PHP 標籤的文章。 顯示所有文章

2019年9月21日 星期六

[筆記] 免費使用Oracle cloud vps並打開port 80端口


Oracle 最近宣布提供個人終身免費VPS,但是我在架設網站的過程中遇到了一些困難,nginx怎麼連都連不上去,就寫下來分享一下

直接進到Oracle Cloud Infrastructure裡面,照著圖片點選

Click instance



Click Virtual Cloud Network



Click subnet

Click default security list


Remove all rules and add a ingress rule like this

Remove all rules and add a Egress rule like this


這樣還不行!!因為oracle的ubunt有內建ip table,我們把iptables刪除

ssh進去後輸入
sudo apt remove iptables

啟用root登入 Enable root login

  1. sudo passwd root
  2. sudo nano /etc/ssh/sshd_config
    • PermitRootLogin prohibit-password -> PermitRootLogin yes
    • PasswordAuthentication no -> PasswordAuthentication yes
  3. sudo service ssh restart



這樣就設定完成了

接著安裝nginx請參考這篇

另外,提醒一下要注意免費額度400是否有在扣款,Instance shape必須是VM.Standard.E2.1.Micro才是免費的

VM.Standard.E2.1---> Paid
VM.Standard.E2.1.Micro ---> Free

2015年9月9日 星期三

[筆記] crontab not working

目前唯一解
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

加入crontab,之後可以直接使用php5

0 13 * * 5 php5 /var/www/html/gasprice/xxx.php

[筆記] MySQL - Access denied for user

別固執想要用phpmyadmin新增user並授與權限,用command才不會錯,別問為什麼,因為我不知道

http://stackoverflow.com/questions/6445917/connect-failed-access-denied-for-user-rootlocalhost-using-password-yes