PHP 5는 지원이 종료되었으며 2026년 1월 31일에 지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 PHP 5 애플리케이션을 배포할 수 없습니다. 기존 PHP 5 애플리케이션은 지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다. 지원되는 최신 PHP 버전으로 마이그레이션하는 것이 좋습니다.
로컬 개발 서버(dev_appserver.py)는 gcloud CLI의 App Engine 구성요소의 일부입니다. 이 주제에서는 dev_appserver.py 사용 방법에 대한 고급 정보를 제공합니다.
로컬 테스트에 대한 자세한 내용은 로컬 개발 서버 사용을 참조하세요.
지원이 중단되었습니다. 로컬 Datastore가 자동 ID를 할당하는 방법입니다. 옵션은 sequential 또는 scattered입니다. 기본값은 scattered입니다.
--admin_host=ADMIN_HOST
로컬 개발 서버의 관리 콘솔이 바인딩되어야 하는 호스트 이름입니다(기본값: localhost).
--admin_port=ADMIN_PORT
로컬 개발 서버의 관리 콘솔이 바인딩되어야 하는 포트입니다(기본값: 8000).
--clear_datastore=yes|no
웹 서버를 시작하기 전에 Datastore 데이터 및 기록 파일을 지웁니다.
기본값은 no입니다.
--datastore_path=...
로컬 Datastore 데이터 파일에 사용할 경로입니다. 존재하지 않으면 서버가 이 파일을 만듭니다.
--enable_sendmail=yes|no
이메일 메시지 전송을 위해 로컬 컴퓨터의 Sendmail 설치를 사용합니다.
--enable_task_running=yes|no
개발 서버에서 push 태스크를 실행하도록 사용 설정합니다. 기본값은 yes입니다.
no로 지정하면 서버에서 push 태스크를 실행하지 않습니다.
--help
유용한 메시지를 출력한 후 종료합니다.
--host=...
서버에 사용할 호스트 주소입니다. 네트워크의 다른 컴퓨터에서 개발 서버에 액세스하려면 이 주소를 설정해야 합니다. 주소가 0.0.0.0이면 localhost 액세스 및 IP 또는 호스트 이름 액세스가 모두 허용됩니다.
기본값은 localhost입니다.
--log_level=...
로깅 메시지가 콘솔에 기록되는 최저 로깅 수준입니다. 지정된 로깅 수준 이상의 메시지가 출력됩니다.
가능한 값은 debug, info, warning, error, critical입니다.
--port=...
서버에 사용할 포트 번호입니다. 기본값은 8080입니다. 서비스 등을 위해 여러 서버가 실행된 경우 8081, 8082와 같은 후속 포트가 할당됩니다.
--logs_path=...
기본적으로 로컬 개발 서버의 로그는 메모리에만 저장됩니다. 로그를 파일에 저장하기 위해 로컬 개발 서버를 실행할 때 이 옵션을 지정하면 서버가 다시 시작되어도 로그를 계속 사용할 수 있습니다.
SQLite 데이터베이스 파일에 디렉터리 경로와 이름을 지정해야 합니다. SQLite 데이터베이스 파일은 아직 존재하지 않는 경우, 지정된 이름을 사용하여 생성됩니다. 예를 들면 다음과 같습니다. 예를 들면 --logs_path=/home/logs/boglogs.db입니다.
--require_indexes=yes|no
index.yaml 파일의 항목 자동 생성을 중지합니다. 대신, 파일에 색인을 정의하도록 요구하는 쿼리가 애플리케이션에서 수행되었을 때 색인 정의가 발견되지 않으면, App Engine에서 실행할 때 발생하는 것과 비슷한 예외가 발생합니다. 기본값은 no입니다.
--smtp_host=...
이메일 메시지 전송에 사용할 SMTP 서버의 호스트 이름입니다.
--smtp_port=...
이메일 메시지 전송에 사용할 SMTP 서버의 포트 번호입니다.
--smtp_user=...
이메일 메시지를 전송할 수 있도록 SMTP 서버에 사용할 사용자 이름입니다.
--smtp_password=...
이메일 메시지를 전송할 수 있도록 SMTP 서버에 사용할 비밀번호입니다.
--storage_path=...
--datastore_path, --blobstore_path, --logs_path로 재정의되지 않는 한 Datastore, Blobstore, Cloud Storage 파일 및 로그와 같은 모든 로컬 파일이 저장되는 경로입니다.
로컬 런타임 프로세스에 사용자가 정의한 환경 변수입니다. 각 env_var는 키=값 형식이며 여러 환경 변수를 정의할 수 있습니다. 이 플래그는 app.yaml의 env_variables 외에도 로컬 프로세스에 추가 환경 변수를 설정할 수 있게 해줍니다.
예를 들면 --env_var KEY_1=val1 --env_var KEY_2=val2입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003edev_appserver.py\u003c/code\u003e is a local development server tool within the App Engine components of the gcloud CLI, used for testing applications locally.\u003c/p\u003e\n"],["\u003cp\u003eBefore running \u003ccode\u003edev_appserver.py\u003c/code\u003e, it is required to use Python 3 and set the \u003ccode\u003eCLOUDSDK_DEVAPPSERVER_PYTHON\u003c/code\u003e environment variable to the path of your Python 2 interpreter.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edev_appserver.py\u003c/code\u003e command utilizes flags like \u003ccode\u003e--admin_port\u003c/code\u003e, \u003ccode\u003e--host\u003c/code\u003e, and \u003ccode\u003e--port\u003c/code\u003e to configure the local development server, among others, and can also leverage various other options as displayed by the \u003ccode\u003e-h\u003c/code\u003e command.\u003c/p\u003e\n"],["\u003cp\u003eThe local server can use different features like sending email, or push task by setting up different flags like \u003ccode\u003e--enable_sendmail\u003c/code\u003e and \u003ccode\u003e--enable_task_running\u003c/code\u003e to yes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--storage_path\u003c/code\u003e flag can be used to specify the location of local files such as Datastore, Blobstore, Cloud Storage files and logs, that will be stored unless the more specific datastore, blobstore, or logs flag is used instead.\u003c/p\u003e\n"]]],[],null,["# Local Development Server Options\n\nThe local development server (`dev_appserver.py`) is part of the App Engine\ncomponents of the [gcloud CLI](/sdk/docs). This topic provides advanced\ninformation about the `dev_appserver.py` usage.\n\n\nSee [Using the Local Development Server](/appengine/docs/legacy/standard/php/tools/using-local-server)\nfor more information about local testing.\n\n\nSet up the local development server tool\n----------------------------------------\n\n| **Important:** Before running the local development server, follow the [setup instructions](/appengine/docs/legacy/standard/php/tools/using-local-server#set-up). Regardless of your app's runtime or language version, you must run `dev_appserver.py` with Python 3 and set the `CLOUDSDK_DEVAPPSERVER_PYTHON` environment variable in your shell to the path of your Python 2 interpreter.\n\nA sample `dev_appserver.py` command might look as follows: \n\n python2 \u003cvar translate=\"no\"\u003eDEVAPPSERVER_ROOT\u003c/var\u003e/google_appengine/dev_appserver.py \u003cvar translate=\"no\"\u003eOPTION\u003c/var\u003e yaml_path \u003cvar translate=\"no\"\u003eFILES\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eDEVAPPSERVER_ROOT\u003c/var\u003e with the path to the root directory where you extract the archived version of `devapp_server.py`. For more information about downloading and using the archived version of `dev_appserver.py`, see [Using the local development server](/appengine/docs/legacy/standard/php/tools/using-local-server#before_you_begin).\n- \u003cvar translate=\"no\"\u003eOPTION\u003c/var\u003e with a flag supported by the local development server.\n- \u003cvar translate=\"no\"\u003eFILES\u003c/var\u003e specifies one or more `app.yaml` files, one per service, for the positional argument `yaml_path`.\n\nFor a complete list of options, run the following:\n\n\u003cvar translate=\"no\"\u003eDEVAPPSERVER_ROOT\u003c/var\u003e/google_appengine/dev_appserver.py -h\n\nCommon options\n--------------\n\nThe most common options are as follows:\n\n`--auto_id_policy=...`\n: Deprecated. How the local datastore assigns automatic IDs. Options are\n `sequential` or `scattered`. The default is `scattered`.\n\n`--admin_host=ADMIN_HOST`\n: Host name to which the local development server's administration console\n should bind (default: localhost).\n\n`--admin_port=ADMIN_PORT`\n: Port to which the local development server's administration console should\n bind (default: 8000).\n\n`--clear_datastore=yes|no`\n: Clears the datastore data and history files before starting the web server.\n The default is `no`.\n\n`--datastore_path=...`\n: The path to use for the local datastore data file. The server creates this\n file if it does not exist.\n\n`--enable_sendmail=yes|no`\n: Uses the local computer's Sendmail installation for\n sending email messages.\n\n`--enable_task_running=yes|no`\n: Enables the development server to run push tasks. The default is `yes`.\n If you specify `no`, the server will not run push tasks.\n\n`--help`\n: Prints a helpful message then quits.\n\n`--host=...`\n: The host address to use for the server. You may need to set this to be able\n to access the development server from another computer on your network. An\n address of `0.0.0.0` allows both localhost access and IP or hostname access.\n Default is `localhost`.\n\n`--log_level=...`\n: The lowest logging level at which logging messages will be written to the\n console; messages of the specified logging level or higher will be output.\n Possible values are `debug`, `info`, `warning`, `error`, and `critical`.\n\n`--port=...`\n: The port number to use for the server. Default is `8080`. If multiple servers\n are launched such as for services, they will be assigned subsequent ports,\n such as `8081`, `8082`.\n\n`--logs_path=...`\n: By default, the logs for the local development server are stored in memory\n only. Specify this option when you run the local development server to store\n the logs into a file, which makes the logs available across server restarts.\n You must specify the directory path and name to a SQLite database file. A\n SQLite database file is created with the specified name if the file does not\n already exist. For example: `--logs_path=/home/logs/boglogs.db`\n\n`--require_indexes=yes|no`\n: Disables automatic generation of entries in the `index.yaml` file. Instead,\n when the application makes a query that requires that its index be defined in\n the file and the index definition is not found, an exception will be raised,\n similar to what would happen when running on App Engine. The default value is\n `no`.\n\n\n`--smtp_host=...`\n: The hostname of the SMTP server to use for sending email messages.\n\n`--smtp_port=...`\n: The port number of the SMTP server to use for sending email messages.\n\n`--smtp_user=...`\n: The username to use with the SMTP server for sending email messages.\n\n`--smtp_password=...`\n: The password to use with the SMTP server for sending email messages.\n\n`--storage_path=...`\n: Path at which all local files, such as the Datastore,\n Blobstore, Cloud Storage files and logs, will be stored, unless\n overridden by `--datastore_path`, `--blobstore_path`, or `--logs_path`.\n\n`--support_datastore_emulator=yes|no`\n: Use the Cloud Datastore Emulator (beta) for local datastore emulation.\n\n`--datastore_emulator_port=...`\n: The port number to use for Cloud Datastore Emulator (beta).\n\n`--env_var=...`\n: User defined environment variable for the local runtime process. Each\n `env_var` is in the format of key=value, and you can define multiple\n environment variables. In addition to `env_variables` in the `app.yaml`, this\n flag allows setting extra environment variables for local processes.\n For example:`--env_var KEY_1=val1 --env_var KEY_2=val2`\n\n\n`--php_executable_path=...`\n: Path to the php-cgi binary.\n\n`--php_gae_extension_path=...`\n: Path to the gae_runtime_module.so binary.\n\n`--php_remote_debugging=yes|no`\n: Set to yes to enable remote debugging with XDebug"]]