Zend Framework application without virtual hosts

后端 未结 4 1590
天命终不由人
天命终不由人 2020-12-30 16:37

Is it possible to configure web server on Windows (Apache or IIS) without setting up virtual hosts so Zend Framework application could be accessed with link like http://exam

4条回答
  •  暖寄归人
    2020-12-30 17:04

    As suggested in zend documentation here https://framework.zend.com/manual/2.4/en/user-guide/skeleton-application.html#using-the-built-in-php-cli-server, You can use the built-in CLI server using command

    php -S 0.0.0.0:8080 -t public/ public/index.php
    

    to run this just open command prompt and type above command like this

    php -S 0.0.0.0:8080 -t {path_of_project's_public_folder} {path_of_project's_public_folder_upto_idex.php_file}
    

    then hit enter and now you can open to your project like this http://localhost:8080/. Your application is running on 8080 port you can change it to something else like 8000 or 5050.

    I hope it will help someone.

提交回复
热议问题