Shiori: mudanças entre as edições

De MochilaWiki
Ir para navegaçãoIr para pesquisar
Sem resumo de edição
 
(Uma revisão intermediária pelo mesmo usuário não está sendo mostrada)
Linha 67: Linha 67:
  WantedBy=multi-user.target
  WantedBy=multi-user.target


 
Iniciando
<source lang="bash">
<source lang="bash">
sudo systemctl enable --now shiori
sudo systemctl enable --now shiori
sudo service shiori start
sudo service shiori start
</source>
</source>
Credenciais:
username: shiori
password: gopher
=== no Nginx ===
em /etc/nginx/sites-available/shiori
<source lang="nginx">
server {
listen 80;
listen [::]:80;
server_name links.seusite.com.br;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
</source>
reiniciando nginx
<source lang="bash">
ln -s /etc/nginx/sites-available/shiori /etc/nginx/sites-enabled/shiori
systemctl daemon-reload
systemctl restart nginx
</source>
== Configuração Apache 2 ==
<source lang="bash">
sudo apt-get install apache2 -y
echo "ServerName localhost" | sudo tee -a /etc/apache2/apache2.conf
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo nano /etc/apache2/sites-available/shiori.conf
</source>
Configuração do Apache
<source lang="apache">
<VirtualHost *:80>
    ServerName links.seusite.com.br
    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
</VirtualHost>
</source>
Reiniciando o Apache
<source lang="bash">
sudo a2ensite gitea
sudo systemctl restart apache2
</source>
=== Referências ===
* [https://github.com/go-shiori/shiori/wiki/Frequently-Asked-Question Frequently Asked Question]
https://github.com/go-shiori/shiori/wiki/Usage

Edição atual tal como às 23h00min de 3 de agosto de 2021

wget https://github.com/go-shiori/shiori/releases/download/v1.5.0/shiori-linux-amd64
sudo mkdir /var/lib/shiori
sudo mv shiori-linux-amd64 /usr/bin/shiori
sudo chmod +x /usr/bin/shiori

em /etc/systemd/system/shiori.service

[Unit]
Description=shiori service
Requires=network-online.target
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/shiori serve
Restart=always
User=shiori
Group=shiori

Environment="SHIORI_DIR=/var/lib/shiori"
DynamicUser=true
PrivateUsers=true
ProtectHome=true
ProtectKernelLogs=true
RestrictAddressFamilies=AF_INET AF_INET6
StateDirectory=shiori
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
SystemCallFilter=~@chown
SystemCallFilter=~@keyring
SystemCallFilter=~@memlock
SystemCallFilter=~@setuid
DeviceAllow=

CapabilityBoundingSet=
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectSystem=full
ProtectClock=true
ProtectKernelModules=true
ProtectProc=noaccess
ProtectHostname=true
ProcSubset=pid
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=~@clock
SystemCallFilter=~@debug
SystemCallFilter=~@module
SystemCallFilter=~@mount
SystemCallFilter=~@raw-io
SystemCallFilter=~@reboot
SystemCallFilter=~@privileged
SystemCallFilter=~@resources
SystemCallFilter=~@cpu-emulation
SystemCallFilter=~@obsolete
UMask=0077

[Install]
WantedBy=multi-user.target

Iniciando

sudo systemctl enable --now shiori
sudo service shiori start

Credenciais:

username: shiori
password: gopher

no Nginx

em /etc/nginx/sites-available/shiori

server {
listen 80;
listen [::]:80;
server_name links.seusite.com.br;
location / {
proxy_pass http://127.0.0.1:8080;
}
}

reiniciando nginx

ln -s /etc/nginx/sites-available/shiori /etc/nginx/sites-enabled/shiori
systemctl daemon-reload
systemctl restart nginx


Configuração Apache 2

sudo apt-get install apache2 -y
echo "ServerName localhost" | sudo tee -a /etc/apache2/apache2.conf
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo nano /etc/apache2/sites-available/shiori.conf

Configuração do Apache

<VirtualHost *:80>
    ServerName links.seusite.com.br
    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
</VirtualHost>

Reiniciando o Apache

sudo a2ensite gitea
sudo systemctl restart apache2

Referências

https://github.com/go-shiori/shiori/wiki/Usage