Changeset 969
- Timestamp:
- 03/13/06 20:20:15 (2 years ago)
- Files:
-
- trunk/doc/book/content/project_creation.txt (modified) (2 diffs)
- trunk/doc/book/content/web_server.txt (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/book/content/project_creation.txt
r851 r969 100 100 To be able to access and test the new application, the web server has to be configured. Here is an example for Apache, where a new VirtualHost is added in the `httpd.conf` file: 101 101 102 <Directory "/$data_dir/symfony/web/sf"> 103 AllowOverride All 104 Allow from All 105 </Directory> 102 106 <VirtualHost *:80> 103 107 ServerName myapp.example.com … … 108 112 <Directory "/home/steve/myproject/web"> 109 113 AllowOverride All 114 Allow from All 110 115 </Directory> 111 116 </VirtualHost> 112 117 113 >**Note**: In the above configuration, the `$data_dir` in the `Alias` linehas to be replaced by your PEAR data directory. For example, for *nix, you should type:118 >**Note**: In the above configuration, the `$data_dir` placeholders has to be replaced by your PEAR data directory. For example, for *nix, you should type: 114 119 > 115 120 > Alias /sf /usr/local/lib/php/data/symfony/web/sf trunk/doc/book/content/web_server.txt
r807 r969 21 21 Let's assume that you run an Apache server. To setup a virtual host for the `myapp` application, add the following lines to the `httpd.conf` file: 22 22 23 <Directory "/$data_dir/symfony/web/sf"> 24 AllowOverride All 25 Allow from All 26 </Directory> 23 27 <VirtualHost *:80> 24 28 ServerName myapp.example.com … … 29 33 <Directory "/home/steve/myproject/web"> 30 34 AllowOverride All 35 Allow from All 31 36 </Directory> 32 37 </VirtualHost> 33 38 34 The `Alias` statement in the middle is necessary for the images of the debug sidebar to be displayed. The `$data_dir` has to be replaced by your PEAR data directory. For example, for *nix, you should type:39 The `Alias` statement in the middle is necessary for the images of the debug sidebar to be displayed. The `$data_dir` placeholders has to be replaced by your PEAR data directory. For example, for *nix, you should type: 35 40 36 41 Alias /sf /usr/local/lib/php/data/symfony/web/sf … … 70 75 http://myapp.example.com/main/index 71 76 72 But the default `settings.yml` of the application contains a `suffix` parameter that tells what has to be added to all the action names: 77 The default `settings.yml` of the application contains a commented `suffix` parameter: 78 79 all: 80 # .settings: 81 # suffix: . 82 83 In order to make the `index` action of the `main` module appear like: 84 85 http://myapp.example.com/main/index.html 86 87 You can uncomment and set the `suffix` parameter to `.html`: 73 88 74 89 all: … … 76 91 suffix: .html 77 92 78 This is why the `index` action of the `main` module appears like:79 80 http://myapp.example.com/main/index.html81 82 Of course, you're free to remove this suffix by writing in place:83 84 all:85 .settings:86 suffix:87 88 93 Alias 89 94 ----- … … 98 103 <Directory "/home/steve/myproject/web"> 99 104 AllowOverride All 105 Allow from All 100 106 </Directory> 101 107 … … 120 126 121 127 You can add a new virtual host in your Apache `httpd.conf` That's fairly easy to understand: 128 129 <Directory "/$data_dir/symfony/web/sf"> 130 AllowOverride All 131 Allow from All 132 </Directory> 122 133 123 134 <VirtualHost *:80> … … 129 140 <Directory "/home/steve/myproject/web"> 130 141 AllowOverride All 142 Allow from All 131 143 </Directory> 132 144 </VirtualHost> … … 140 152 <Directory "/home/steve/myproject/web"> 141 153 AllowOverride All 154 Allow from All 142 155 </Directory> 143 156 </VirtualHost>