Posts

Showing posts from June, 2014

Samba on Ubuntu

Installation: sudo apt-get install samba It should install and run both smbd and nmbd Configurations: sudo nano /etc/samba/smb.conf Make the following changes, workgroup = WORKGROUP security = user [share] comment = Ubuntu file server share path = /var/www browsable = yes guest ok = yes read only = no create mask = 0755 Change nmbd config (netBIOS name server), sudo nano /etc/init/nmbd.conf disable the following lines # NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/nu$ # [ "x$NMBD_DISABLED" = xYes ] && { stop; exit 0; } Then restart nmbd demons, sudo restart nmbd General commands: sudo restart smbd

Nginx with php-fpm (on Debian)

Nginx installation sudo apt-get install nginx Basic server commands sudo service nginx start sudo service nginx stop sudo service nginx restart Configurations The main configuration file located in /etc/nginx/nginx.conf And, keep all the virtual host files inside the sites-available folder located at /etc/nginx/. Should make symlink with sites-enabled folder. ln -s /etc/nginx/sites-available/test  /etc/nginx/sites-enabled/test  where test is the virtual host config file. Sample virtual host with PHP supports: server {     listen 80;     server_name 192.168.18.129;     rewrite_log on;     #access_log /var/log/nginx/local.access.log;     #error_log /var/log/nginx/local.error.log;     root /var/www;     gzip on;     gzip_min_length 1000;     location / { autoindex on;         index index.php index.html;     }       # different location directive     location /laravel {         alias /var/www/laravel/public;         index index.php;