Monday, July 29, 2019

Making Node.js service always alive on Ubuntu Server

Making file /etc/systemd/system/hello_world.service , this would be the main file as a configuration to SystemD service
[Unit]
Description=Node.js Hello World Http Server
[Service]
PIDFile=/tmp/hello_world-99.pid
User=<Your Username>
Group=<Your User Group>
Restart=always
KillSignal=SIGQUIT
WorkingDirectory=/home/<username>/hello_world/
ExecStart=/usr/bin/node /home/<username>/hello_world/server.js
[Install]
WantedBy=multi-user.target

sudo systemctl enable hello_world.service
sudo systemctl start|stop|status hello_world.service

Friday, July 26, 2019

boroo\.AndroidStudio3.4\config\studio64.exe.vmoptions

-server
-Xms1024m
-Xmx2048m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djna.nosys=true
-Djna.boot.library.path=
-da

Friday, July 19, 2019

How to Install CodeIgniter PHP Framework on Ubuntu 18.04 LTS

<VirtualHost *:80>
 #ServerAdmin admin@yourdomain.com
 #ServerName yourdomain.com
 DocumentRoot /home/boroo/ftp/projects/codeigniter
 <Directory /home/boroo/ftp/projects/codeigniter/>
   Options +FollowSymLinks
   AllowOverride All
   Order allow,deny
   allow from all
 </Directory>
 ErrorLog /var/log/apache2/codeigniter-error_log
 CustomLog /var/log/apache2/codeigniter-access_log common
</VirtualHost>
linux server deer apache garaar tohiruulj baihad rewrite mod ajillahgui tohioldol baival htacces doorhi tohirgood hiigeerei, support ssl+rewrite mod. result: https://domain/subdir/api
#on apache2
#Options Indexes FollowSymLinks Includes ExecCGI
#AllowOverride All
<IfModule mod_rewrite.c>
RewriteEngine on
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>