viコマンド
vi /etc/httpd/conf/httpd.conf
保存 :wq!
出る :q
httpd起動
# /etc/init.d/httpd start
もしくは
# service https start
httpd再起動
# /etc/init.d/httpd restart
もしくは
# service httpd restart
メモとか
from Japan
2014年8月1日金曜日
2013年12月30日月曜日
2013年6月20日木曜日
apacheのリダイレクト設定・バーチャルホストの場合
......中略........
<VirtualHost :80*>
ServerName www.example.jp
Redirect / http://www.example.com/
</VirtualHost>
......中略........
※www.example.jpにアクセスすると,www.example.comに転送される。
2013年6月6日木曜日
VirtualHostの設定・フォルダ飛ばし
test.hogehoge.netのhtmlを直接見に行かせる。
この場合、folder2のディレクトリにindex.htmlなどを入れてテストした。
<VirtualHost *:80>
DocumentRoot /var/www/html/hogehogefolder/folder1/folder2
ServerName hogehoge.com
ServerAlias test.hogehoge.net
Options FollowSymLinks ExecCGI
</VirtualHost>
フォルダ飛ばせていいかんじー
NameVirtualHost *:80がコメントアウト#になってるからはずすね。
この場合、folder2のディレクトリにindex.htmlなどを入れてテストした。
<VirtualHost *:80>
DocumentRoot /var/www/html/hogehogefolder/folder1/folder2
ServerName hogehoge.com
ServerAlias test.hogehoge.net
Options FollowSymLinks ExecCGI
</VirtualHost>
フォルダ飛ばせていいかんじー
NameVirtualHost *:80がコメントアウト#になってるからはずすね。
2013年6月3日月曜日
2013年5月2日木曜日
アクセス時、端末での表示サイト切り分け
.htaccessを編集
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (iPhone|Android.*Mobile|Windows.*Phone) [NC]
RewriteCond %{QUERY_STRING} !mode=pc
RewriteRule ^$ /sp/ [R,L]
</IfModule>
~
~
~
".htaccess" 6L, 193C
CMSとかならプラグインつかうかレスポンシブデザインの方がいいかもね。
登録:
投稿 (Atom)