我不太擅长网络(仍然在学习)而且我遇到了一个让我在过去3个小时内在网上搜索并且无济于事的障碍。
这是我的情景:
我有一个Web服务器(LAMP),上面有一个Wiki(特别是MediaWiki)。每当我的LAN上的任何计算机访问服务器的本地IP(例如192.168.1.2)时,它们将被重定向到127.0.1.1/foo/bar。
然后,当我手动将IP从127.0.1.1更改回192.168.1.2时,网站会加载Wiki,但是没有CSS或Javascript只是HTML。
我尝试过mod_rewrite,但它对我没有任何作用。
有人有什么想法吗?
# domain: mediawiki
# public: /var/www/html/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin foobar@home
ServerName 192.168.1.2
ServerAlias 192.168.1.2
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/public_html
# Log file locations
LogLevel warn
ErrorLog /var/www/log/error.log
CustomLog /var/www/log/access.log combined
</VirtualHost>