doushan7077
2016-08-25 18:42 阅读 38
已采纳

Softaculous启动symfony应用程序

So i have downloaded Softaculous (ampps), and from their dashboard I installed the symfony framework, and it created a symfony3 folder with all of the files in the www directory (with an index.php file in the root directory of symfony that only prints a welcome message).

When I access it through http://localhost/symfony3/ it shows the index.php (if i remove the index.php it just shows the tree of the symfony3 directory)

Is it possible to set my localhost to launch the app? If I run php bin/console server:start it launches my app on localhost with port 8000. Is it possible to set up Ampps to launch my app when it is accessed through localhost/symfony3/ ? Thanks in advance!

EDIT: So turns out I could do this just by editing the httpd70.conf file (ampps>conf>httpd70.conf)

find the <VirtualHost 127.0.0.1:80> block and change the <Directory "{$path}/www"> to the web folder in your app (in my case it was <Directory "{$path}/www/symfony3/web"> and do the same thing for DocumentRoot "{$path}/www" in the same block. Restart your Apache. You should now see your app when you just go to http://localhost/ (http://localhost/app_dev.php/)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    douzhao7634 douzhao7634 2016-08-26 07:56

    If I understood your question, you need to set up you web server with correct configuration file and to change permissions for Symfony project.

    It might be helpful (documentation for Symfony 2.8.*):

    1. Web server configuration.
    2. Symfony project file permissions.
    点赞 评论 复制链接分享

相关推荐