Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion cs/quickstart/getting-started.texy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ cd nette-blog && chmod -R a+rw temp log
```

.[note]
Na některých Linuxech (Fedora, CentOS, ...), je standardně zapnutý SELinux. Budete muset patřičně upravit SELinux policies, anebo nastavit správný SELinux security context pro složky temp a log.
Na některých Linuxech (Fedora, CentOS, ...), je standardně zapnutý SELinux. Budete muset patřičně upravit SELinux policies a nastavit správný SELinux security context pro složky 'temp' a 'log'. Pro 'temp' a 'log' nastavíme typ kontextu 'httpd_sys_rw_content_t', pro zbytek aplikace (a hlavně pro složku 'app') bude stačit 'httpd_sys_content_t'. Pokud se tedy vaše aplikace nachází ve výchozím '/var/www/html' (Fedora, CentOS, RHEL), pak na serveru spusťte:
```
semanage fcontext -at httpd_sys_rw_content_t '/var/www/html/nette-blog/log(/.*)?'
semanage fcontext -at httpd_sys_rw_content_t '/var/www/html/nette-blog/temp(/.*)?'
restorecon -Rv /var/www/html/nette-blog/
```
Dále je potřeba povolit SELinux boolean 'httpd_can_network_connect_db', který ve je výchozím nastavení vypnutý a který povolí Nette připojit se k databázi přes síť. Využijeme k tomu příkaz 'setsebool' a volbou '-P' provedeme změnu trvale, tzn. po rebootu serveru nás nebude čekat nemilé překvapení:
```
setsebool -P httpd_can_network_connect_db on
```

Uvítací stránka
===============
Expand Down
11 changes: 10 additions & 1 deletion en/quickstart/getting-started.texy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ cd nette-blog && chmod -R a+rw temp log
```

.[note]
On some Linux systems (Fedora, CentOS, ...), SELinux may be enabled by default. You may need to update SELinux policies, or set paths of temp and log directories with correct SELinux security context.
On some Linux systems (Fedora, CentOS, ...), SELinux may be enabled by default. You may need to update SELinux policies, or set paths of 'temp' and 'log' directories with correct SELinux security context. Directories 'temp' and 'log' should be set to 'httpd_sys_rw_content_t' context; for the rest of the application -- mainly 'app' folder -- 'httpd_sys_content_t' context will be enough. Assuming your application is located in the default directory '/var/www/html' (Fedora, CentOS, RHEL), run on the server as root:
```
semanage fcontext -at httpd_sys_rw_content_t '/var/www/html/nette-blog/log(/.*)?'
semanage fcontext -at httpd_sys_rw_content_t '/var/www/html/nette-blog/temp(/.*)?'
restorecon -Rv /var/www/html/nette-blog/
```
Next, the SELinux boolean 'httpd_can_network_connect_db' needs to be enabled to permit Nette to connect to the database over network. By default, it is disabled. The command 'setsebool' can be used to perform this task, and if the option '-P' is specified, this setting will be persistent across reboots.
```
setsebool -P httpd_can_network_connect_db on
```

The Welcome Page
================
Expand Down