dphphvs496524 2015-06-30 12:43
浏览 19
已采纳

在共享主机上部署Symfony2

I can not find reply to my question. I am trying to understand how i should deploy symfony2 app on shared hosting. I know i should rename my "web" catalog to "public_html", but i have many sites in this catalog. My catalog's structure is like:

-public_html
  -www.firstsite.com
  -www.secondsite.com
  ...
  -www.nextsite.com
-private_html

So where i should put my files? app,src,vendor under public_html, and files from web i should put directly to "public_html"? Or catalog web should be in public_html and other files under public_html? So i will have:

-public_html
  -...
  -web
-private_html
-app
-src
-...

EDIT: Now i have whole app in "public_html/example/" It's work fine, but it is safe?

  • 写回答

2条回答 默认 最新

  • dongzou1964 2015-06-30 13:23
    关注

    You should create a folder for your new website inside "public_html". Let's say you have the domain "example.com".

    You will have: public_html/example.com, public_html/example2.com, ..

    Inside the folder example.com you will copy the folders: app, src, public.. (all Symfony's project main folders and files).

    To answer to your question. "EDIT: Now i have whole app in "public_html/example/" It's work fine, but it is safe?". Yes, it's safe.

    Just search on google for: "prevent directory traversal", if you want to make sure that it's secure.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料