Commit 49928b39 authored by Shawn McCool's avatar Shawn McCool

added server configuration to the documentation

parent 6e28d0bf
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
- [Requirements](#requirements) - [Requirements](#requirements)
- [Installation](#installation) - [Installation](#installation)
- [Server Configuration](#server-configuration)
- [Basic Configuration](#basic-configuration) - [Basic Configuration](#basic-configuration)
- [Environments](#environments) - [Environments](#environments)
- [Cleaner URLs](#cleaner-urls) - [Cleaner URLs](#cleaner-urls)
...@@ -37,8 +38,27 @@ Installing the following goodies will help you take full advantage of Laravel, b ...@@ -37,8 +38,27 @@ Installing the following goodies will help you take full advantage of Laravel, b
If you are having problems installing, try the following: If you are having problems installing, try the following:
- Make sure the **public** directory is the document root of your web server. - Make sure the **public** directory is the document root of your web server. (see: Server Configuration below)
- If you are using mod_rewrite, set the **index** option in **application/config/application.php** to an empty string. - If you are using mod_rewrite, set the **index** option in **application/config/application.php** to an empty string.
- Verify that your storage folder and the folders within in are writable by your web server.
<a name="server-configuration"></a>
## Server Configuration
Like most web-development frameworks, Laravel is designed to protect your application code, bundles, and local storage by placing only files that are necessarily public in the web server's DocumentRoot. This prevents some types of server misconfiguration from making your code (including database passwords and other configuration data) accessible through the web server. It's best to be safe.
In this example let's imagine that we installed Laravel to the directory **/Users/JonSnow/Sites/MySite**.
A very basic example of an Apache VirtualHost configuration for MySite might look like this.
<VirtualHost *:80>
DocumentRoot /Users/JonSnow/Sites/MySite/public
ServerName mysite.dev
</VirtualHost>
Notice that while we installed to **/Users/JonSnow/Sites/MySite** our DocumentRoot points to /Users/JonSnow/Sites/MySite/public**.
While pointing the DocumentRoot to the public folder is a commonly used best-practice, it's possible that you may need to use Laravel on a host that does not allow you to update your DocumentRoot. A collection of algorithms to circumvent this need can be found [http://forums.laravel.com/viewtopic.php?id=1258](on the Laravel forums.)
<a name="basic-configuration"></a> <a name="basic-configuration"></a>
## Basic Configuration ## Basic Configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment