2015年10月7日水曜日

【Symfony2.7ドキュメント読んだ?】ビルトインWebサーバの使い方

ビルトインWebサーバの起動、停止、確認コマンド

cd project_name
php app/console server:run

# Webサーバ起動後に次のURLにアクセスします。
# http://localhost:8000/

# IPアドレスおよびポート指定で起動
php app/console server:run 192.168.0.1:8080

# バックグラウンドで実行させたい場合
php app/console server:start
php app/console server:start 192.168.0.1:8080

# サーバの停止
php app/console server:stop
php app/console server:stop 192.168.0.1:8080

# サーバ状態の確認
php app/console server:status
php app/console server:status 192.168.0.1:8080

# 環境変数やルータースクリプトの指定
php app/console server:start --env=test --router=app/config/router_test.php

# ドキュメントルートを指定する
php app/console server:start --docroot=public_html

関連サイト


0 件のコメント:

コメントを投稿