OS X Apache configuration, if encountered "the requested URL/~your Username/was not found on this server." Here are the detailed answers

Source: Internet
Author: User

Search from the Internet casually, follow the steps to modify/etc/apache2/httpd.conf

On the internet for half a day, I was missing a sentence of this

#LoadModule userdir_module libexec/apache2/mod_userdir.so

It's mine, it's been changed.

Last Login:thu One  +: to: -On Ttys003hanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/Httpd.confhanxueyingdemacbook-pro:~hanxueying$ sudo apachectl restarthanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/Apache2.httpd.confPassword:hanxueyingdeMacBook-pro:~ hanxueying$ sudo vi/etc/apache2/Httpd.confhanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/httpd-Userdir.confhanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/extra/httpd-Userdir.confhanxueyingdemacbook-pro:~hanxueying$ sudo apachectl restarthanxueyingdemacbook-pro:~ hanxueying$ vi/etc/apache2/users/Hanxueying.conf[no Write since last change]/bin/Bash:wq:command not Foundshell returned127Press ENTER or type command toContinue[No write since last change]/bin/Bash:wq:command not Foundshell returned127Press ENTER or type command toContinue[No write since last change]press ENTER or type command toContinueHanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/users/Hanxueying.confPassword:hanxueyingdeMacBook-pro:~hanxueying$ sudo apachectl restarthanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/users/Hanxueying.confPassword:hanxueyingdeMacBook-pro:~ hanxueying$ sudo vi/etc/apache2/users/Hanxueying.confhanxueyingdemacbook-pro:~ hanxueying$ sudo vi/etc/apache2/httpd.conf## This isThe 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># fora discussion of each configuration directive.## does not simply read the instructionsinchHere 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 formany# of the server's control files begin with "/" (or "drive:/" for Win32), the# Server would use thisExplicitPath. If the Filenames Do*not*begin# with"/", the value of ServerRoot isprepended--so"Logs/access_log"# with ServerRootSetTo"/usr/local/apache2"would be interpreted by the# server as "/usr/local/apache2/logs/access_log", whereas"/logs/access_log"# would 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

And in the/private/etc/apache2/users/your username.conf to write as

" /users/yourusername/sites/ ">  Options Indexes multiviews  allowoverride None  Require all granted</ Directory>

OS X Apache configuration, if encountered "the requested URL/~your Username/was not found on this server." Here are the detailed answers

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.