duanqian9593 2015-06-17 14:54
浏览 47
已采纳

带有共享wp内容的IIS上的Wordpress

I've been trying to install Wordpress on IIS and everything went smoothly with a standard installation and an handler mapping for php-cgi.

Since I have a public server (A) and a private shared server (B), I need to have a WP installation on server A with a shared database and shared wp-content on server B.

The main issue is configuring a Virtual Directory on IIS for wp-content on server B with the required permissions. The Wordpress on server A is able to access the media resources (images and other files). Through wp-admin, I can also access and upload new resources to the shared wp-content.

The problem starts as soon as I try to see the installed plugins or install new ones, since WP can't access the plugins folder, and, as a consequence, the website can't be viewed as well.

I've already tried several things in order to solve the referred problem.

The steps I tried, not necessarily in this order, were:

  • Created an user on both machines with the required permissions on wp-content;

  • Gave full access permissions to that user (also Everyone) on wp-content;

  • Created a Virtual Directory on IIS and Connecting As the created user;
  • Running the Default Web Site APP Pool with that user;

At the step I'm at, the wordpress does not load the installed plugins and asks for FTP credentials while trying to install new ones.

It seems to me that the problem may be with additional permissions that I don't know about.

If anyone has successfully accessed a shared wp-content with IIS, please help me before I go mad.

Thanks in advance

  • 写回答

2条回答 默认 最新

  • dongliao1860 2015-06-17 19:56
    关注

    Assuming:

    +-----------+      +----------+
    |  Server A | <--  | Server B |
    +-----------+      +----------+
    

    First, lets look at the App Pool for Server A -> Site A and Server B -> Site B. I would advise using Impersonation versus a service account. This will allow you to leverage AD or Local Users.

    Second test with the UNC path in Explorer from Server B to Server A (\server-a\wp-content). If you have not setup a share, you may want to do this. You're going to encounter speed issues etc, but I don't think it will be bad. Map a drive, for example Z:\, to this path.

    If you stick with a service account, make sure that IIS_IUSR and Users groups have Read & Execute permissions and make sure the Computer account of Server B is a member of those groups (create a computer account for Server B if needed).

    If we get this far, I think we need a symbolic link. A virtual directory would be great but does not work for file system calls from PHP. For example if a page attempts to make a include not using a URL path.

    This should help: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

    On Server B run something like:

    mklink /J C:\inetpub\wwwroot\wp-content Z:\
    

    Adjust for the proper paths on your server.

    Hope this helps.

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

报告相同问题?

悬赏问题

  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable