Skip to content

Instantly share code, notes, and snippets.

@NakanishiTetsuhiro
Last active January 29, 2017 10:05
Show Gist options
  • Select an option

  • Save NakanishiTetsuhiro/75d316c1ba99779f36cb4abfc030cc14 to your computer and use it in GitHub Desktop.

Select an option

Save NakanishiTetsuhiro/75d316c1ba99779f36cb4abfc030cc14 to your computer and use it in GitHub Desktop.

チェックシート

  • .htaccess
  • vhosts.conf
  • httpd.conf

Common

  • php --ini で設定ファイルをどこから呼び出しているのかを知ることができる
  • xdebugの設定ファイルがどこにあるかわからなくなったら、phpinfo;の"Additional .ini files parsed"でpathを確認する
  • 読み込んでいるphp.iniの場所がわからなくなったら、phpinfo();の"Configuration File (php.ini) Path"で確認する

Apacheのディレクティブ一覧

https://httpd.apache.org/docs/2.2/ja/mod/directives.html

Apacheのドキュメントルートにvagrantの共有フォルダを指定しているとSELinuxのせいで403エラーがかえってくる

sudo vim /etc/selinux/config

SELINUX=の行をdisabledに変更してサーバーを再起動

mysql

### テーブルの構造を知りたい

show columns from TABLENAME;

CentOS

httpdとmysqldの自動起動

http://linux.just4fun.biz/CentOS/Apache(httpd)%E3%81%AE%E8%87%AA%E5%8B%95%E8%B5%B7%E5%8B%95%E8%A8%AD%E5%AE%9A.html

Ubuntu

  • httpd.conf は /etc/apache2/apache2.conf に相当する

apache2の今の状態を知りたい

service apache2 status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment