dongnong3799 2011-02-03 20:47
浏览 70
已采纳

在同一个apache web服务器中为多个域使用相同的php软件?

Basically, lets say i have a webserver and i resell hosting specifically for local churches.

i have 5 churches as clients, i have a simple CMS made for them they are equal copies of the same files, for each website i install the CMS , database and the website, i think it's a waste of resources.

i would like to know if i can do the following, afaik most webhosts have the following structure:

  • A main directory (home)
    • www.church1.com (church1)
    • www.church2.com (church2)
    • www.church3.com (church3)
    • www.church4.com (church4)
    • www.church5.com (church5)

basically i want the CMS to be on the Home directory, and each one of the Churches (clients) would only have a Config file, a Database ant the template regarding their websites.

so the system source code would be shared, but the website design and the database files would be completelly separated.

i'm not a webhosting or a development expert, but i know my way around, i'm sorry if the question is too basic, i'm having a hard time finding if this is possible.

EDIT: I Think Rudu's reference pretty much solved my problem!

  • 写回答

2条回答 默认 最新

  • drba1172 2011-02-03 22:46
    关注

    Since you are building it yourself, put the include files (application logic) in a folder or include path that is accessible to all the domains. Then you can put your template files, images and stylesheets in the individual domain folders. If you are database driven you can check the domain $_SERVER['HTTP_HOST'] and load results from a certain table or database based off of that. You really can go a lot of different directions here if you are building it yourself.

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

报告相同问题?

悬赏问题

  • ¥100 有偿求数字经济对经贸的影响机制的一个数学模型,弄不出来已经快要碎掉了
  • ¥15 这个公式写进SIMULINK中的function模块的代码中应该是什么样的
  • ¥15 javaweb登陆的网页为什么不能正确连接查询数据库
  • ¥15 数学建模数学建模需要
  • ¥15 已知许多点位,想通过高斯分布来随机选择固定数量的点位怎么改
  • ¥20 nao机器人语音识别问题
  • ¥15 怎么生成确定数目的泊松点过程
  • ¥15 layui数据表格多次重载的数据覆盖问题
  • ¥15 python点云生成mesh精度不够怎么办
  • ¥15 QT C++ 鼠标键盘通信