Skip to content

Commit 2201432

Browse files
committed
public_html directory is the document root now
1 parent 0f677b8 commit 2201432

File tree

13 files changed

+382
-489
lines changed

13 files changed

+382
-489
lines changed

.htaccess

Lines changed: 0 additions & 71 deletions
This file was deleted.

INSTALL

Lines changed: 10 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ REQUIREMENTS
3333
INSTALLATION
3434
============
3535

36-
1. Decompress and put this folder somewhere inside your document root.
36+
1. Decompress and put this folder somewhere inside your server's filesystem.
3737
Note: Make sure files have proper owner/group for your setup. If you use
3838
tar command `--no-same-owner` option might be helpful.
3939
2. In case you don't use the so-called "complete" release package,
@@ -46,20 +46,18 @@ INSTALLATION
4646
- run `php composer.phar update --no-dev`
4747
2.2. Install Javascript dependencies by executing `bin/install-jsdeps.sh` script.
4848
2.3. Install some developer tools by executing `npm install`.
49+
2.4. If you use git sources, compile css files for the Elastic skin as described
50+
in the skins/elastic/README.md file.
4951
3. Make sure that the following directories (and the files within)
5052
are writable by the webserver
5153
- /temp
5254
- /logs
5355
4. Create a new database and a database user for Roundcube (see DATABASE SETUP)
54-
5. Point your browser to http://url-to-roundcube/installer/
55-
6. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
56-
7. After creating and testing the configuration, remove the installer directory
57-
------------------------------------------
58-
IMPORTANT: REMOVE THE INSTALLER DIRECTORY!
59-
------------------------------------------
60-
8. If you use git sources, compile css files for the Elastic skin as described
61-
in the skins/elastic/README.md file.
62-
9. Check Known Issues section of this file
56+
5. Configure your HTTP server and point it to Roundcube's public_html directory.
57+
This is the document root.
58+
6. Point your browser to http://url-to-roundcube/installer.php.
59+
7. Follow the instructions of the install script (or see MANUAL CONFIGURATION).
60+
8. Check Known Issues section of this file
6361

6462

6563
CONFIGURATION HINTS
@@ -160,35 +158,6 @@ PHP settings: upload_max_filesize and post_max_size. Read more about PHP
160158
settings at https://github.com/roundcube/roundcubemail/wiki/Installation#php-configuration.
161159

162160

163-
SECURE YOUR INSTALLATION
164-
========================
165-
166-
Access through the webserver to the following directories should be denied:
167-
168-
/config
169-
/temp
170-
/logs
171-
172-
Roundcube uses .htaccess files to protect these directories, so be sure to
173-
allow override of the Limit directives to get them taken into account. The
174-
package also ships a .htaccess file in the root directory which defines some
175-
rewrite rules. In order to properly secure your installation, please enable
176-
mod_rewrite for Apache webserver and double check access to the above listed
177-
directories and their contents is denied.
178-
179-
NOTE: In Apache 2.4, support for .htaccess files has been disabled by
180-
default. Therefore you first need to enable this in your Apache main or
181-
virtual host config by with:
182-
183-
AllowOverride all
184-
185-
For non-apache web servers add equivalent configuration parameters to deny
186-
direct access to these private resources.
187-
188-
It is also recommended to change the document root to <install path>/public_html
189-
after installation if Roundcube runs at root of a dedicated virtual host. This
190-
will automatically keep sensitive files out of reach for http requests.
191-
192161
CONTENT-SECURITY-POLICY
193162
-----------------------
194163

@@ -207,73 +176,8 @@ please refer to the instructions in UPGRADING guide.
207176
OPTIMISING
208177
==========
209178

210-
There are two forms of optimization here, compression and caching, both aimed
211-
at increasing an end user's experience using Roundcube Webmail. Compression
212-
allows the static web pages to be delivered with less bandwidth. The index.php
213-
of Roundcube Webmail already enables compression on its output. The settings
214-
below allow compression to occur for all static files. Caching sets HTTP
215-
response headers that enable a user's web client to understand what is static
216-
and how to cache it.
217-
218-
The caching directives used are:
219-
* Etags - sets at tag so the client can request is the page has changed
220-
* Cache-control - defines the age of the page and that the page is 'public'
221-
This enables clients to cache javascript files that don't have private
222-
information between sessions even if using HTTPS. It also allows proxies
223-
to share the same cached page between users.
224-
* Expires - provides another hint to increase the lifetime of static pages.
225-
226-
For more information refer to RFC 2616.
227-
228-
Side effects:
229-
-------------
230-
These directives are designed for production use. If you are using this in
231-
a development environment you may get horribly confused if your webclient
232-
is caching stuff that you changed on the server. Disabling the expires
233-
parts below should save you some grief.
234-
235-
If you are changing the skins, it is recommended that you copy content to
236-
a different directory apart from 'default'.
237-
238-
Apache:
239-
-------
240-
To enable these features in apache the following modules need to be enabled:
241-
* mod_deflate
242-
* mod_expires
243-
* mod_headers
244-
245-
The optimization is already included in the .htaccess file in the top
246-
directory of your installation.
247-
248-
Lighttpd:
249-
---------
250-
With Lighttpd the addition of Expire: tags by mod_expire is incompatible with
251-
the addition of "Cache-control: public". Using Cache-control 'public' is
252-
used below as it is assumed to give a better caching result.
253-
254-
Enable modules in server.modules:
255-
"mod_setenv"
256-
"mod_compress"
257-
258-
Mod_compress is a server side cache of compressed files to improve its performance.
259-
260-
$HTTP["host"] == "www.example.com" {
261-
262-
static-file.etags = "enable"
263-
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
264-
etag.use-mtime = "enable"
265-
266-
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
267-
$HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
268-
setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
269-
}
270-
271-
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
272-
# set compress.cache-dir to somewhere outside the docroot.
273-
compress.cache-dir = var.statedir + "/cache/compress"
274-
275-
compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
276-
}
179+
Roundcube can be further optimized by using HTTP compression and caching.
180+
HTTP server setup is out of scope for this manual. (TODO: wiki page).
277181

278182

279183
KNOWN ISSUES

UPGRADING

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ WARNING: If you use MySQL < 5.7.7 or MariaDB < 10.2.2 make sure to configure it
3131

3232
Updating manually
3333
-----------------
34-
If you don't have shell access to the Roundcube installation or if not running
34+
If you don't have shell access to the Roundcube installation or if do not run
3535
it on a unix system, you need to do the following operations by hand:
3636

37-
1. Replace index.php and all files in
38-
- ./bin/
39-
- ./SQL/
40-
- ./program/
41-
- ./installer/
37+
1. Replace all files in
38+
- bin/
39+
- SQL/
40+
- public_html/
41+
- program/
42+
- installer/
4243
2. Replace the configuration defaults files:
4344
- config/defaults.inc.php
4445
- config/mimetypes.php
4546
3. rsync the contents of the following folders from your installation
4647
directory into the target folder:
47-
./skins/
48-
./plugins/
49-
./vendor/
48+
- skins/
49+
- plugins/
50+
- vendor/
5051
4. Update dependencies:
5152
4a. If you previously installed plugins through composer, update dependencies
5253
by running `php composer.phar update --no-dev`.
@@ -62,7 +63,7 @@ it on a unix system, you need to do the following operations by hand:
6263
4e. If you use git sources, compile css files for the Elastic skin as described
6364
in the skins/elastic/README.md file.
6465
5. Run `./bin/update.sh` from the commandline OR
65-
open http://url-to-roundcube/installer/ in a browser and choose "3 Test config".
66+
open http://url-to-roundcube/installer.php in a browser and choose "3 Test config".
6667
To enable the latter one, you have to temporary set 'enable_installer'
6768
to true in your local config/config.inc.php file.
6869
WARNING: See SQLite database upgrade below.

bin/installto.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if (strtolower($input) == 'y') {
5858
echo 'Copying files to target location...';
5959

6060
$adds = [];
61-
$dirs = ['bin', 'SQL', 'plugins', 'skins', 'program', 'public_html'];
61+
$dirs = ['bin', 'SQL', 'plugins', 'skins', 'program'];
6262

6363
if (is_dir(INSTALL_PATH . 'vendor') && (!is_file("{$target_dir}/composer.json") || rcmail_install::vendor_dir_untouched($target_dir))) {
6464
$dirs[] = 'vendor';
@@ -77,7 +77,11 @@ if (strtolower($input) == 'y') {
7777
}
7878
}
7979

80-
foreach (['index.php', 'config/defaults.inc.php', 'composer.json-dist', 'jsdeps.json', 'CHANGELOG.md', 'README.md', 'UPGRADING', 'LICENSE', 'INSTALL'] as $file) {
80+
$files = ['config/defaults.inc.php', 'composer.json-dist', 'jsdeps.json',
81+
'CHANGELOG.md', 'README.md', 'UPGRADING', 'LICENSE', 'INSTALL',
82+
'public_html/index.php', 'public_html/installer.php', 'public_html/static.php'];
83+
84+
foreach ($files as $file) {
8185
$source_file = $file === 'composer.json-dist' ? 'composer.json' : $file;
8286
$command = 'rsync -a --out-format=%n ' . INSTALL_PATH . "{$source_file} {$target_dir}/{$file}";
8387

@@ -87,7 +91,7 @@ if (strtolower($input) == 'y') {
8791
}
8892

8993
// Copy .htaccess or .user.ini if needed
90-
foreach (['.htaccess', '.user.ini'] as $file) {
94+
foreach (['public_html/.htaccess', 'public_html/.user.ini'] as $file) {
9195
if (file_exists(INSTALL_PATH . $file)) {
9296
if (!file_exists("{$target_dir}/{$file}") || file_get_contents(INSTALL_PATH . $file) != file_get_contents("{$target_dir}/{$file}")) {
9397
if (copy(INSTALL_PATH . $file, "{$target_dir}/{$file}.new")) {

config/defaults.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@
875875
// <FilesMatch ".(eot|ttf|woff)">
876876
// Header set Access-Control-Allow-Origin "*"
877877
// </FilesMatch>
878-
$config['assets_path'] = '';
878+
$config['assets_path'] = null;
879879

880880
// Options passed when creating Guzzle HTTP client, used to fetch remote content
881881
// For example:

0 commit comments

Comments
 (0)