mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 22:56:20 +01:00
Document Permissions and other Docs Improvments
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
# phpBB3
|
||||
|
||||
## Overview
|
||||
|
||||
phpBB is a free PHP-based forum.
|
||||
|
||||
## Dependencies
|
||||
|
||||
phpBB3 requires PHP installed in your web server. Apache has `mod_php`, NGINX requires `php-fpm`. See [the official guide](https://www.phpbb.com/community/docs/INSTALL.html) for PHP package requirements.
|
||||
|
||||
## Prepare Your Settings
|
||||
|
||||
In your auth project's settings file, do the following:
|
||||
- Add `'allianceauth.services.modules.phpbb3',` to your `INSTALLED_APPS` list
|
||||
- Append the following to the bottom of the settings file:
|
||||
|
||||
- Add `'allianceauth.services.modules.phpbb3',` to your `INSTALLED_APPS` list
|
||||
- Append the following to the bottom of the settings file:
|
||||
|
||||
```python
|
||||
# PHPBB3 Configuration
|
||||
@@ -25,32 +29,43 @@ DATABASES['phpbb3'] = {
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
### Prepare the Database
|
||||
|
||||
Create a database to install phpBB3 in.
|
||||
|
||||
mysql -u root -p
|
||||
create database alliance_forum;
|
||||
grant all privileges on alliance_forum . * to 'allianceserver'@'localhost';
|
||||
exit;
|
||||
```bash
|
||||
mysql -u root -p
|
||||
create database alliance_forum;
|
||||
grant all privileges on alliance_forum . * to 'allianceserver'@'localhost';
|
||||
exit;
|
||||
```
|
||||
|
||||
Edit your auth project's settings file and fill out the `DATABASES['phpbb3']` part.
|
||||
|
||||
### Download phpBB3
|
||||
|
||||
phpBB3 is available as a zip from their website. Navigate to the website’s [downloads section](https://www.phpbb.com/downloads/) using your PC browser and copy the URL for the latest version zip.
|
||||
|
||||
In the console, navigate to your user’s home directory: `cd ~`
|
||||
|
||||
Now download using wget, replacing the URL with the URL for the package you just retrieved
|
||||
|
||||
wget https://www.phpbb.com/files/release/phpBB-3.2.2.zip
|
||||
```bash
|
||||
wget https://www.phpbb.com/files/release/phpBB-3.2.2.zip
|
||||
```
|
||||
|
||||
This needs to be unpackaged. Unzip it, replacing the file name with that of the file you just downloaded
|
||||
|
||||
unzip phpBB-3.2.2.zip
|
||||
```bash
|
||||
unzip phpBB-3.2.2.zip
|
||||
```
|
||||
|
||||
Now we need to move this to our web directory. Usually `/var/www/forums`.
|
||||
|
||||
mv phpBB3 /var/www/forums
|
||||
```bash
|
||||
mv phpBB3 /var/www/forums
|
||||
```
|
||||
|
||||
The web server needs read/write permission to this folder
|
||||
|
||||
@@ -64,49 +79,55 @@ Nginx: `chown -R nginx:nginx /var/www/forums`
|
||||
```
|
||||
|
||||
### Configuring Web Server
|
||||
|
||||
You will need to configure you web server to serve PHPBB3 before proceeding with installation.
|
||||
|
||||
A minimal Apache config file might look like:
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName forums.example.com
|
||||
DocumentRoot /var/www/forums
|
||||
<Directory /var/www/forums>
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
```ini
|
||||
<VirtualHost *:80>
|
||||
ServerName forums.example.com
|
||||
DocumentRoot /var/www/forums
|
||||
<Directory /var/www/forums>
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
A minimal Nginx config file might look like:
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name forums.example.com;
|
||||
root /var/www/forums;
|
||||
index index.php;
|
||||
access_log /var/logs/forums.access.log;
|
||||
```ini
|
||||
server {
|
||||
listen 80;
|
||||
server_name forums.example.com;
|
||||
root /var/www/forums;
|
||||
index index.php;
|
||||
access_log /var/logs/forums.access.log;
|
||||
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|store) {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~* \.(gif|jpe?g|png|css)$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/tmp/php.socket;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|store) {
|
||||
deny all;
|
||||
return 403;
|
||||
}
|
||||
|
||||
location ~* \.(gif|jpe?g|png|css)$ {
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/tmp/php.socket;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Enter your forum's web address as the `PHPBB3_URL` setting in your auth project's settings file.
|
||||
|
||||
### Web Install
|
||||
|
||||
Navigate to your forums web address where you will be presented with an installer.
|
||||
|
||||
Click on the `Install` tab.
|
||||
@@ -114,12 +135,13 @@ Click on the `Install` tab.
|
||||
All the requirements should be met. Press `Start Install`.
|
||||
|
||||
Under Database Settings, set the following:
|
||||
- Database Type is `MySQL`
|
||||
- Database Server Hostname is `127.0.0.1`
|
||||
- Database Server Port is left blank
|
||||
- Database Name is `alliance_forum`
|
||||
- Database Username is your auth MySQL user, usually `allianceserver`
|
||||
- Database Password is this user’s password
|
||||
|
||||
- Database Type is `MySQL`
|
||||
- Database Server Hostname is `127.0.0.1`
|
||||
- Database Server Port is left blank
|
||||
- Database Name is `alliance_forum`
|
||||
- Database Username is your auth MySQL user, usually `allianceserver`
|
||||
- Database Password is this user’s password
|
||||
|
||||
If you use a table prefix other than the standard `phpbb_` you need to add an additional setting to your auth project's settings file, `PHPBB3_TABLE_PREFIX = ''`, and enter the prefix.
|
||||
|
||||
@@ -132,9 +154,12 @@ Everything from here should be intuitive.
|
||||
phpBB will then write its own config file.
|
||||
|
||||
### Open the Forums
|
||||
|
||||
Before users can see the forums, we need to remove the install directory
|
||||
|
||||
rm -rf /var/www/forums/install
|
||||
```bash
|
||||
rm -rf /var/www/forums/install
|
||||
```
|
||||
|
||||
### Enabling Avatars
|
||||
|
||||
@@ -146,11 +171,26 @@ You can allow members to overwrite the portrait with a custom image if desired.
|
||||
|
||||
Users generated via Alliance Auth do not have a default theme set. You will need to set this on the phpbb_users table in SQL
|
||||
|
||||
mysql -u root -p
|
||||
use alliance_forum;
|
||||
alter table phpbb_users change user_style user_style int not null default 1
|
||||
```bash
|
||||
mysql -u root -p
|
||||
use alliance_forum;
|
||||
alter table phpbb_users change user_style user_style int not null default 1
|
||||
```
|
||||
|
||||
If you would like to use a theme that is NOT prosilver or theme "1". You will need to deactivate prosilver, this will then fall over to the set forum wide default.
|
||||
|
||||
### Prepare Auth
|
||||
|
||||
Once settings have been configured, run migrations and restart Gunicorn and Celery.
|
||||
|
||||
## Permissions
|
||||
|
||||
To use this service, users will require some of the following.
|
||||
|
||||
```eval_rst
|
||||
+---------------------------------------+------------------+--------------------------------------------------------------------------+
|
||||
| Permission | Admin Site | Auth Site |
|
||||
+=======================================+==================+==========================================================================+
|
||||
| phpbb3.access_phpbb3 | None | Can Access the PHPBB3 Service |
|
||||
+---------------------------------------+------------------+--------------------------------------------------------------------------+
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user