最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

apache - Move site root directory on debian

programmeradmin3浏览0评论

I installed WordPress on Debian using this article from the Debian Wiki. My wp.conf looks like

Alias /wp/wp-content /var/lib/wordpress/wp-content
Alias /wp /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /var/lib/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>

since I couldn't get the virtual host config file to work. This makes the site visible under mydomain/wp. How can I make the site visible at mydomain? I tried changing the site URL, but that made the site unviewable and I had to manually change the URL values back in the database. Changing Alias /wp to Alias / results in 403s trying to access the root directory. What should I do? Thanks!

I installed WordPress on Debian using this article from the Debian Wiki. My wp.conf looks like

Alias /wp/wp-content /var/lib/wordpress/wp-content
Alias /wp /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /var/lib/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>

since I couldn't get the virtual host config file to work. This makes the site visible under mydomain/wp. How can I make the site visible at mydomain? I tried changing the site URL, but that made the site unviewable and I had to manually change the URL values back in the database. Changing Alias /wp to Alias / results in 403s trying to access the root directory. What should I do? Thanks!

Share Improve this question asked Apr 16, 2018 at 0:02 qxu21qxu21 101
Add a comment  | 

1 Answer 1

Reset to default 0

I would suggest following some other toturial instead of one that lacks any explanations as to the "why" like this one. Linode and digitalocean should have good toturial on how to install wordpress, and although they might not be debian specific, the once regarding ubuntu should probably be compatible with debian.

To answer the question, you need to remove the /wp part of the alias and get something like

Alias /wp-content /var/lib/wordpress/wp-content
Alias / /usr/share/wordpress

And again, I would not setup wordpress like that in two different directories without a reason.

发布评论

评论列表(0)

  1. 暂无评论