Category Archives: Apache

[Apache] wordpress permalink 404 issue

edit site conf (vim /etc/apache2/sites-available/pr.site.org.conf)

enable apache2 rewrite module

restart apache2 service

  Ref. [1] Victor Hung’s Diary: 「教學」解決 WordPress 固定網址設定 404 錯誤 [2] DigitalOcean: WordPress permalinks tried everything  

Posted in Apache, Ubuntu, WordPress | Leave a comment

[Apache] Redirect 80 to 8080

enable proxy_module, proxy_http_module, rewrite_module set < Directory path > in apache config RewriteEngine on AllowOverride All edit .htaccess in your folder < IfModule mod_rewrite.c > RewriteEngine On RewriteBase / RewriteRule ^(.+)$ http://localhost:8080/jwebadm/$1 [P,L] < /IfModule > restart apache

Posted in Apache | Leave a comment

[Apache] Proxypass

Because the default web port of Elasticsearch is 9200. And I want to change it with 80. Maybe I could use the proxypass function. enable the proxy, and restart apache

add following into the /etc/apache2/sites-enabled/000-default.conf

edit the kibana … Continue reading

Posted in Apache, Elasticsearch, Kibana | Leave a comment

Apache SSL Enable

環境 CentOS 5.x i386 產生 key

產生 csr

cat csr,將資料丟到憑證申請的網站輸入

以namecheap的comodo憑證為例,選擇伺服器為 apache + mod_ssl,會回傳兩個檔案至mail中 cowman_ip.ca-bundle cowman_ip.crt 安裝mod_ssl

取消需要輸入phase的機制

編輯 apache 設定檔,範例是在 /etc/httpd/conf.d/ssl.conf

將 http 轉至 https,修改 /etc/httpd/conf/httpd.conf

重新啟動 apache

!! 記得檢查iptables防火牆設定

Posted in Apache, CentOS, SSL | Leave a comment

htaccess ( apache 存取控制 )

修改 /etc/httpd/conf/httpd.conf

到存取控制的目錄下新增檔案 .htaccess

設定權限 htpasswd 第一次使用時參數為 “-c”

Posted in Apache | Leave a comment