我在 VirtualBox 上运行了 Ubuntu 11.10,并且已经设置了一个虚拟命名服务器。
我可以从 Windows 7 访问该站点,但无法从 Ubuntu 访问该站点。
我的 HOSTS 文件位于/etc/
文件夹中,如下所示:
127.0.0.1 localhost
127.0.1.1 ubuntu-VirtualBox
192.168.0.97 mysite.com
Run Code Online (Sandbox Code Playgroud)
但是每当我尝试从服务器访问 mysite.com 时,我都会被重定向到一个网站,说该域名正在出售。
主机文件不起作用的原因可能是什么?
更新
这是我的 /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
#hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts: files dns
networks: files …
Run Code Online (Sandbox Code Playgroud) 我有一个在 CentOS 5 和 Plesk 9 上运行的 VPS。
我的网站在 FastCGI 上运行。
我在阅读/写作课程时遇到问题。在我的服务器上,error_log
我收到以下错误:
(...) Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
(...) open(/var/lib/php/session/sess_v8g5rt6p83b9one3mlg9sh9ts0, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Run Code Online (Sandbox Code Playgroud)
我很想改变
session.save_path = "/var/lib/php/session"
到
session.save_path = "/tmp"
问题是它/tmp
有 chmod 777,所以我不确定这是否是最好的方法?
更新
该session
目录具有以下权利: -rwxrwx---
用户root
组apache
我有这个工作,然后我的VM服务器崩溃了。
我在 Oracle VirtualBox 上运行 Ubuntu。现在我正在尝试添加一些服务器别名,但它不起作用。
在我的“启用站点”文件夹中,我有一个名为mysite.com
. 这有以下数据:
<VirtualHost *:80>
DocumentRoot /var/www/mysite/
ServerName mysite.com
ServerAlias www.mysite.com, sub1.mysite.com, sub2.mysite.com
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/storelocator/>
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
但是我仍然无法使用 sub1.mysite.com 访问该站点。它只显示 www 根文件夹中的文件夹。
我在这里缺少什么?