Web server configuration
Superhive need a web server and PHP to run.
Apache2
First make sure you have rewrite
and actions
modules enabled. If not, Connect to your server with SSH (or SFTP) and execute :
sudo a2enmod rewrite
sudo a2enmod actions
Don't forget to configure your Virtual host and change the directory :
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Restart your Apache2 web server :
sudo systemctl restart apache2
NginX
Assuling your php-fpm is running on port 9001, Here is a virtual host config example :
server {
listen 80;
server_name example.com;
index index.php;
error_log /path/to/example.error.log;
access_log /path/to/example.access.log;
root /path/to/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ \.php {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9001;
}
}
Don't forget to change :
- server_name: point to your URL
- root : root folder (with
public
folder inside) - log path to yours
You can now restart NginX :
sudo systemctl restart nginx
IIS
theweb.config
and index.php
must be in the /public
folder. The web.config
must contain :
```bash
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="slim" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Finish !
Go to http://YOUR_URL/
to finish the SuperHive Installation.