Map Network Drive in Linux

Are you wondering how to do a Map Network Drive in Linux?

It’s called “mount”ing in Linux. There’s a command called mount in linux that helps you maps a network drive to your machine.

if the server you need to mount is also a linux server. try this command

mount -t cifs -o username=UsernameHere,password='PasswordHere' //server-name or ip/Path /your/directory/in/current/dir/

“/your/directory/in/current/dir/” – can be an ln or a directory and has to be present, this is called the mount point on your current server

Refer to the mount.cifs manual page for more info ( man mount.cifs )

Enjoy!

Vanilla Forum 2.1 Nginx Configuration

Are you already loosing you hair trying to configure your vanilla forum url-rewrite on NGINX?

If your forum is installed on a main domain not a subdomain I might have the solution for you. here’s what got, please let me know if it works for you…

server {
    listen       80;
    server_name  yourdomain.com;
    root   /usr/share/nginx/youvanilladirectory/;
    #access_log /usr/share/nginx/youvanilladirectory/access.log;
    access_log off;
    #error_log /usr/share/nginx/youvanilladirectory/error.log;
    error_log off;
    index  index.php index.html index.htm;
    #Root location
    location ^~ /discussion/download/ { rewrite ^/(.+)$ /index.php?p=$1 last;}
    location ^~ /utility/thumbnail/ { rewrite ^/(.+)$ /index.php?p=$1 last;}
    location / {
        try_files $uri $uri/ @forum;
    }
    # Rewrite to prettify the URL and hide the ugly PHP stuff
    # Start with this commented out until you configure it in Vanilla!
    location @forum {
        rewrite ^/(.+)$ /index.php?p=$1 last;
    }
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ {
        expires 1y;
    }
}

Setup vsftpd user default dir (CentOS)

Hi,

Today, I’m sharing how to simply setup the default directory of your vsftpd user on CentOS.

1. Edit vsftpd.conf

vi /etc/vsftpd/vsftpd.conf

2. Add the line

user_config_dir=/etc/vsftpd/vsftpd_user_conf

3. Create a dir, and change directory to the created dir

mkdir /etc/vsftpd/vsftpd_user_conf; cd /etc/vsftpd/vsftpd_user_conf/

4. Create a file with the username as filename of the vsftpd user

vi username

5. Add the line

local_root=/var/www/html

You’re done! Once the user logs in, the file you’ve just created will be used to read as config parameter. I believe it should also work with other flavour of Linux, only the vsftpd installation are different.

(for more info just man vsftpd.conf)

Cheers!