OS X apache配置,若碰到"The requested URL /~your userName/ was not found on this server."这里有详细解答

从网上随便搜一下,按步骤做到修改/etc/apache2/httpd.conf

在网上查了半天,我是漏了一句这个

#LoadModule userdir_module libexec/apache2/mod_userdir.so

这是我的,已经改好了

Last login: Thu Aug 11 19:31:58 on ttys003
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/httpd.conf
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo apachectl restart
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2.httpd.conf
Password:
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/httpd.conf
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/httpd-userdir.conf
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/extra/httpd-userdir.conf
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo apachectl restart
hanxueyingdeMacBook-Pro:~ hanxueying$ vi /etc/apache2/users/hanxueying.conf

[No write since last change]
/bin/bash: wq: command not found

shell returned 127

Press ENTER or type command to continue
[No write since last change]
/bin/bash: wq: command not found

shell returned 127

Press ENTER or type command to continue
[No write since last change]

Press ENTER or type command to continue
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/users/hanxueying.conf
Password:
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo apachectl restart
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/users/hanxueying.conf
Password:
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/users/hanxueying.conf
hanxueyingdeMacBook-Pro:~ hanxueying$ sudo vi /etc/apache2/httpd.conf

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They‘re here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server‘s control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
# will be interpreted as ‘/logs/access_log‘.

#
# ServerRoot: The top of the directory tree under which the server‘s
# configuration, error, and log files are kept.
"/etc/apache2/httpd.conf" 531L, 20592C

还有在 /private/etc/apache2/users/Your UserName.conf中要写为

<Directory "/Users/YourUserName/Sites/">
  Options Indexes MultiViews
  AllowOverride None
  Require all granted
</Directory>
时间: 2024-10-23 21:27:47

OS X apache配置,若碰到"The requested URL /~your userName/ was not found on this server."这里有详细解答的相关文章

【每日学习】Apache重写未开启,导致The requested URL /xxxx.html was not found on this server

今天把项目环境从集成换成独立的,全部搭建好后,网站主页www.xxx.com能打开,但一涉及到跳转,带参数,比如 www.xxx.com/xxx/xxx.html 就会报错 The requested URL /xxxx.html was not found on this server 因为是新搭建的环境,apache的重写未开启,开启重写后,问题解决,方法如下: apache 打开 httpd.conf 文件 找到 #LoadModule rewrite_module modules/mod

新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误

The requested URL /home/profession was not found on this server. 通过xxx.com, 首页可以正常访问,xxx.com/xx/xx 就出现 The requested URL xxx was not found on this server. 1,找到apache配置文件httpd.conf配置文件中的 AllowOverride none Require all denied 改成 Options Indexes FollowS

虚拟目录下apache点击报The requested URL* was not found on this server.

首先,我yum的httpd,把备份好的文件会存到/data/backup,并且在http.conf中配置虚拟目录 alias /mogodb/ "/data/backup" <Directory "/data/backup">     Options Indexes FollowSymLinks     AllowOverride All     Order allow,deny     Allow from all </Directory>

linux下配置lamp时候出现The requested URL /info.php was not found on this server问题

在经历修改各种配置文件和各种文件权限后,发现了怎么解决 On newer versions of Ubuntu, the document root is set to /var/www/html instead of /var/www. You might have followed an old tutorial which was written for Ubuntu 12.04. If /var/www/html exists, try moving info.php to it. Mo

在Mac OS X中配置Apache + PHP + MySQL

在Mac OS X中配置Apache + PHP + MySQL Mac OS X 内置Apache 和 PHP,使用起来非常方便.本文以Mac OS X 10.6.3和为例.主要内容包括: 启动Apache 运行PHP 安装MySQL 使用phpMyAdmin 配置PHP的MCrypt扩展库 设置虚拟主机 启动Apache 有两种方法: 打开“系统设置偏好(System Preferences)” -> “共享(Sharing)” -> “Web共享(Web Sharing)”. 打开“终端

在Mac OS X中配置Apache + PHP + MySQL 很详细

这是一篇超级详细的配置mac os下面php+mysql+apache的文章.非常详细我的大部分配置就是参考上面的内容的,比如,PHP不能连接数据库,就是改一下默认的php.ini中pdo_mysql.default_socket[因为现在都用PDO了嘛.不用mysql的连接库了]因为我是用navicat的,所以对phpmyadmin那一块的配置就不太关心了.不过MCrypt的安装可以参考.原文来自:在Mac OS X中配置Apache + PHP + MySQL内容如下: Mac OS X 内

Mac OS X 上的Apache配置

Mac系统自带apache服务器 查看apache版本 sudo apachectl -v 启动apache sudo apachectl start 重启apache sudo apachectl restart 配置apache apache的主配置文件在路径/etc/apache2/下 修改httpd.conf 文件 备份原来的文件 sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.backup 修改主配置文件 $vi /etc

Apache无法启动提示the requested operation has failed

主要参考这篇 http://apps.hi.baidu.com/share/detail/15868128 但还是遇到一些问题,记录如下: 1. 配置完成后,restart apache,出现 the requested operation has failed 查看log,有 httpd.exe: Syntax error on line 129 of F:/work_soft/www/server/apache/conf/httpd.conf: Can't locate API module

Apache的配置详解,最好的Apache配置文档

http://blog.csdn.net/apple_llb/article/details/50253889 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd.conf文件中修改. 主站点的配置(基本配置) (1) 基本配置: ServerRoot "/mnt/software/apache2" #你的apache软件安装的位置.其它指定的目录如果没有指定绝对路径,则目录是相对于该目录. PidFile logs/httpd.pid #第一个htt