operating_systems:raspbian:easydoor_configuration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
operating_systems:raspbian:easydoor_configuration [2019/07/11 08:29] – [Lighttpd setup] maferreira | operating_systems:raspbian:easydoor_configuration [2019/07/15 09:37] – [Lighttpd setup] maferreira | ||
---|---|---|---|
Line 35: | Line 35: | ||
# mkdir / | # mkdir / | ||
# touch / | # touch / | ||
+ | # ln -s / | ||
# chmod 600 / | # chmod 600 / | ||
Line 104: | Line 105: | ||
| | ||
#If I start iceweasel from cmd line instead of here it will use the full screen available. | #If I start iceweasel from cmd line instead of here it will use the full screen available. | ||
- | / | + | / |
#/ | #/ | ||
#/ | #/ | ||
Line 187: | Line 188: | ||
=== PHP installation === | === PHP installation === | ||
First, you need to install PHP-FPM, which is a process manager for PHP. | First, you need to install PHP-FPM, which is a process manager for PHP. | ||
- | # apt install --no-install-recommends php7.0-fpm | + | # apt install --no-install-recommends php7.0-fpm |
+ | |||
+ | <note warning> | ||
+ | php7.0-mbstring is required because we use gettext to translate our website. If it is not installed, you will get a php fatal error. | ||
+ | </ | ||
Then, enable it the typing the following: | Then, enable it the typing the following: | ||
# lighttpd-enable-mod fastcgi | # lighttpd-enable-mod fastcgi | ||
# lighttpd-enable-mod fastcgi-php | # lighttpd-enable-mod fastcgi-php | ||
+ | |||
+ | <note tip> | ||
+ | We could edit the **php.ini** and **lighttpd.conf** files but it's cleaner using **lighttpd-enable-mod** We could edit the php.ini and lighttpd.conf files but it's cleaner using lighttpd-enable-mod command since it only enables the 2 config files that load fastgi, hence not modifying the webserver config file. | ||
+ | </ | ||
Now before we can go reloading Lighttpd, we will have to make changes to its configuration. By default, it is configured to work with PHP-CGI and not PHP-FPM, luckily it is easy to make these changes. | Now before we can go reloading Lighttpd, we will have to make changes to its configuration. By default, it is configured to work with PHP-CGI and not PHP-FPM, luckily it is easy to make these changes. | ||
Line 221: | Line 230: | ||
?> | ?> | ||
- | Since /var/log is mounted in tmpfs and apache | + | And again, test it from a local machine. |
- | # vi / | + | |
- | d /var/log/apache2 | + | Now that PHP is setup, it's time to create a virtual host. In lighttpd, all you need to do is to create a file in / |
+ | # vi / | ||
+ | |||
+ | $HTTP[" | ||
+ | server.document-root = "/ | ||
+ | server.errorlog = "/ | ||
+ | } | ||
+ | |||
+ | Enable the virtual host you have just created by creatign a symlink to / | ||
+ | # ln -s / | ||
+ | |||
+ | Don't forget to add easydoor to your hosts file. | ||
+ | # vi / | ||
+ | |||
+ | 127.0.0.1 easydoor | ||
+ | |||
+ | <note tip> | ||
+ | If you want to have access logs, you need to enable the accesslog mod. To do that, use the same command we used to enable the fastgci modules. | ||
+ | </ | ||
+ | |||
+ | # lighttpd-enable-mod accesslog | ||
+ | |||
+ | Restart **lighttpd** and see if there are any errors. | ||
+ | |||
+ | <note warning> | ||
+ | Since /var/log is mounted in tmpfs and lighttpd | ||
+ | </ | ||
+ | |||
+ | # vi / | ||
+ | d /var/log/lighttpd | ||
- | Reference: [[https:// | + | References:\\ |
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
+ | [[https:// | ||
===== Strike ===== | ===== Strike ===== |