Meta

Kategorie: FNMP

WORK IN PROGRESS

Well it’s time again to setup a new hosting box and as time goes by I’m goint to try out something new again. So up until now it was set into stone that I would use Debian as the OS but I got more and more fed up with old and outdated packages/versions. I looked for alternatives and well I ended up choosing freebsd over ubuntu server and centos because of ZFS!! ZFS is the server filesystem to rule em all!!! I won’t go into the details why but if you’re interested I greatly suggest taking a look. Freebsd 10 makes it fairly easy to setup the system with zfs as root file system. Well next will be installing a admin panel to make hosting some websites easier. So this tutorial is about setting up a webstack with:

Don’t worry, that’s normal since nginx wasn’t started yet and the directory wasn’t created yet =) but our’s syntax is ok so all is good! ok let’s get us some admin panel!

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

# change directory

cd/usr/local/www/

# download latest froxlor version

wget http://files.froxlor.org/releases/froxlor-latest.tar.gz

# the content should go in to the folder /var/www/froxlor

# note: the archive contains the folder 'froxlor' already!

tar xvfz froxlor-latest.tar.gz

# remove archive

rm froxlor-latest.tar.gz

#change owner of the directory

chown-Rwww:www/usr/local/www/froxlor/

chmod755/usr/local/www/froxlor

now restart php-fpm and nginx and hope we didn’t fuck up something :O

1

2

/usr/local/etc/rc.d/php-fpm restart

/usr/local/etc/rc.d/nginx restart

Browse to your froxlor installation and if everything went fine you should see the Froxlor webpage! Proceed with the Froxlor installation as asked! After the successful install let’s configure the panel since I don’t like the default path froxlor uses and to adhere FreeBSD convention user installed stuff should be placed in /usr/local/

1

2

3

4

5

6

7

8

9

mkdir-p/usr/local/customers/webs/

mkdir-p/usr/local/customers/logs/

mkdir-p/usr/local/customers/mail/

mkdir-p/usr/local/customers/tmp/

mkdir-p/usr/local/etc/php-fpm.d/

mkdir-p/usr/local/php-fpm/

pw groupadd froxlorlocal

pw useradd froxlorlocal-gfroxlorlocal-s/sbin/nologin-d/dev/null

chown-Rfroxlorlocal:froxlorlocal/usr/local/www/froxlor

Now Login to the admin panel and navigate to

1

Settings->System settings

and set the Home directory to

1

/usr/local/customers/webs/

hit save and then open up

1

Settings->Webserver settings

Change Webserver vHost configuration file/dirname to

1

/usr/local/etc/nginx/sites-enabled/

Webserver diroptions configuration file/dirname to

1

/usr/local/etc/nginx/sites-enabled/

Webserver htpasswd dirname to

1

/usr/local/etc/nginx/froxlor-htpasswd/

Logfiles directory to

1

/usr/local/customers/logs/

Webserver reload command to

1

/usr/local/etc/rc.d/nginx restart

Path to fastcgi_params file to

1

/usr/local/etc/nginx/fastcgi_params

again, save the settings. If you wan’t to enable SSL then you should set Configure the allowed SSL ciphers to

and get yourself a valid SSL certificate (I recommend StartSSL) which provides them for free. Next step is configuring pfp-fpm and to do this enable php-fpm in the Setting panel, hit save and then klick on Settings to the right of php-fpm Configuration directory of php-fpm

1

/usr/local/etc/php-fpm.d/

Configuration Alias-directory of php-fpm

1

/usr/local/php-fpm/

Temp directory

1

/usr/local/customers/tmp/

Global PEAR directories

1

/usr/local/share/php/

FastCGI IPC directory

1

/var/run/

php-fpm restart command

1

/usr/local/etc/rc.d/php-fpm restart

Process manager control (pm)

1

dynamic

The number of child processes

1

50

The number of child processes created on startup

1

2

The desired minimum number of idle server processes

1

5

The desired maximum number of idle server processes

1

5

Requests per child before respawning

1

150

Configure fpm to actually load the config files from Froxlor

open up

1

/usr/local/etc/php-fpm.conf

and put the pollowing at the end of the file

1

2

3

4

5

6

7

8

9

10

11

12

;;;;;;;;;;;;;;;;;;;;

;Pool Definitions;

;;;;;;;;;;;;;;;;;;;;

;Multiple pools of childprocesses may be started with different listening

;ports anddifferent management options.The name of the pool will be

;used inlogs andstats.There isno limitation on the number of pools which