First you need to share windows folder for everyone with full access permissions,Than in Linux /etc/fstab file add this line:
1 |
//ws/linuxwww /home/user/windowsshare cifs iocharset=utf8,noserverino,credentials=/home/user/.smbcredentials,uid=500,gid=501,mode=0777,dir_mode=0777 0 0 |
ws is windows server name, linuxwww windows shared folder. /home/user/windowsshare This is where windows shared folder mounted in linux.
You need authorize params for windows, for this create /home/user/.smbcredentials and type in:
1 2 |
username=DOMAIN/USERNAME password=PASSWORD |
save and set permission 600.
Remember to use noserverino option because cifs default have serverino and you may have problem with php is_dir function
Now add virtualhost in apache, configuration is simply nothing special:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Listen 80 <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/user/windowsshare <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/home/user/windowsshare"> Options Indexes FollowSymLinks MultiViews AllowOverride All DirectoryIndex index.php index.html index.htm Order allow,deny allow from all </Directory> </VirtualHost> |