> For the complete documentation index, see [llms.txt](https://sagar-r-kothari.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sagar-r-kothari.gitbook.io/blog/_posts/2019-08-13-start-apache-server.md).

# 2019-08-13-Start-apache-server

1. Start Terminal
2. Enter following command (after replacing userNameHere with your user name)

```
sudo vi /etc/apache2/users/userNameHere.conf
```

1. Paste following into that file & save.

```
<Directory "/Users/USERNAME/Sites/">
    Options Indexes Multiviews
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
</Directory>
```

1. Run following command to start apache server.

```
sudo apachectl start
```

1. Launch Safari, Chrome, or Firefox.
2. Navigate to "<http://127.0.0.1>" to verify the server is running, you will see an “It Works!” message.
3. Move your files to `/Library/WebServer/Documents/`

Stop server

```
sudo apachectl stop
```

Restart server

```
sudo apachectl restart
```
