doushan7077 2016-08-25 18:42
浏览 45
已采纳

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 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.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀