Skip to content

Commit

Permalink
documenting sub directory configuration for SeAT and Apache (#7)
Browse files Browse the repository at this point in the history
* documenting sub directory configuration for SeAT and Apache

* typo fix
  • Loading branch information
warlof authored and leonjza committed Aug 12, 2017
1 parent 90547c0 commit 852e69f
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion docs/installation_guides/generic_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,62 @@ Add the following line to the webserver users crontab (remember to check the pat
```

### webserver
Lastly, configure a webserver to server the `public/` directory from the folder that was downloaded when the `composer create-project` command was run.
Lastly, configure a webserver to serve the `public/` directory from the folder that was downloaded when the `composer create-project` command was run.

Thats it! SeAT should now be available at http://your-domain-or-ip/

#### install SeAT in a subfolder
Instead of using a domain or an alias (CNAME) in order to serve your SeAT application,
you can use a subfolder (alias directory).

ie : seat.goonswarmfederation.eve
- seat is a CNAME, we want to use it in order to serve SeAT
- example.com is our domain, we have our main website served from it

ie : example.com/seat
- seat is an alias directory, we want to redirect all related requests to a specific path on our server (it can be named seat, but also something else)
- seat.example.com is our domain, we want to serve our forum from it

##### Apache Setup
In order to use an alias directory, we have to change the default SeAT virtual host config file.
In fact, instead using the default vhost configuration file, we will alter our existing configuration, adding SeAT rules into it.

```
<VirtualHost *:80>
ServerName example.com # put any A/AAAA/CNAME entries here, this is for DNS records only (don't put subfolder here)
ServerAlias seat.example.com # put any CNAME entries here, please, don't put any subfolder, this is DNS records ONLY
ServerAdmin [email protected]
DocumentRoot /var/www/example.com
# this is our forum rules
<Directory "/var/www/example.com">
AllowOverride All
Order allow, deny
Allow from all
</Directory>
Alias /seat /var/www/html/seat # all goonswarmfederation.eve/seat will be serve with content into /var/www/seat
# we're using /seat as directory alias which is routing to /var/www/html/seat
# but it could also work with /myapp /var/www/html/seat, in this case, we will redirect all goonswarmfederation.net/myapp to /var/www/html/seat
# the important things is that directory should match with bellow <Directory> rull
# and, the alias should match with RewriteBase rule
# this is SeAT rules
<Directory "/var/www/html/seat">
AllowOverride All
Order allow,deny
Allow from all
# this rule will only be applied if rewrite_mod has been enabled
<IfModule rewrite_module>
RewriteBase /seat # put here the alias you want to use, this will enforce url rewritting
</IfModule>
</Directory>
ErrorLog ${APAGE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
```

We've seen here http configuration file, but exactly same things apply to https (443).
You just have to include certificate rules and replace *:80 by *:443.

0 comments on commit 852e69f

Please sign in to comment.