Mirror backup WAMP folder into external hard drive - wamp

I got Seagate Backup Plus Slim 1TB today.
I am planning to do mirror backup of my web projects from pc (C:\wamp46\www) to external drive (E:).
The toolkit app created folders on C:\ and E:\ both named "Mirror" as the syncing folder. Tested it and it works well.
But Seagate says:
The Mirror folders must each be named “Mirror” in order to sync. Do not rename the folders.
Now, how can I mirror backup my files under "www" folders if I can't rename "www" folder?
Is there any way?
Thanks!

So try to rename WAMP root folder from C:\wamp46\www to C:\Mirror
Edit the httpd.conf file and/or the vhosts.conf file for the site wish to change. The Directory directive will let you specify where the files for this site are to be located.
For more info on httpd.conf see: http://httpd.apache.org/docs/2.2/configuring.html
And specifically: http://httpd.apache.org/docs/2.2/mod/core.html#directory

Related

Put files to home directory

I trying to "debianization" my small programm. My programm has "templates" directory. This folder contains the files the user is working with. The user will also store their files in this directory. But all these operations are done by my program, and I want to hide this folder in the "HOME" directory. But I do not understand how this can be done with the debianization of the package? I can create a bash script that will create the necessary folders for me, but how can I transfer an already prepared folder with files to a package?
A deb package can only install things in /usr and configuration files in /etc. You generally should not modify users' home directories during installation; packages might create customizations for individual users if and when they interact with the installed package e.g. by running an installed utility for the first time.
Obvious workarounds such as looping over all individual users' home directories from the postinst or configure script violate Debian policy, create unpleasant surprises, and obviously don't work for users whose accounts are created after the package was installed.

Difference between /var/www/html directory and /www as root directory

I was setting up a website on a web hosting service.
When I was transferring the files using ssh, I had to put the files in the www folder in my root directory (I would use cd www to get there), but when I was using AWS server in the previous occasion, I had to go to /var/www/html directory to put the files in and get the website running.
Are there any differences to these two formats? The website works fine, but I was just worried that there may be a pitfall or something!
Thanks in advance!
You should be fine, different distributions of Linux have different default locations for the DocumentRoot directory, and on your hosting service the hosting company may have changed the location from the default. But as long as you and the Apache process have read / write permissions on the root directory, you shouldn't
have any problems.

Deployment with WebStorm (JetBrains) - sends only one file

I configure deployment setting in WebStorm to location on my VPS. When I'm trying deploy to VPS WebStorm sends only one file - index.html
I want to send all files (or recently updated like in version control).
I've checked configuration but can't find any settings let me choose file to send.
How to send all files to VPS?
Select the files and or folders you want to deploy in Project Files Alt + 1. Right-click and select Deployment -> Sync with Deployed to .... This will check the files and folders for differences with the remote host. Continuing with this dialog will upload (and download) the latest changes.
Be wary, this might take a while over FTP when processing large projects.

Sharing a directory from the VM to the host

I use config.vm.synced_folder to sync folders from the host to the VM, but I'd like to sync it in the other direction. Is this possible using vagrant/virtualbox?
By default Vagrant uses VirtualBox's vboxsf to sync folders between host and guest.
It is two way, so if you make changes to the files in /vagrant_data in the guest, it changes the corresponding files in the host's directory. You don't need to do it again the other way around.
Other options to sync files:
rsync
sshfs
NFS
See more => Synced Folders
If I understand correctly, you're looking to create a shared folder for Vagrant where files are being added from the guest machine and should show up in the host machine?
If that's the case, you're still going to have to create the host folder. I'm afraid Vagrant won't create the directory for you from a config.vm.synced_folder line in your Vagrantfile, but it will work fantastically once the host directory exists.

What are the 'correct' permission setting for django site running on apache2 server

I am very new to apache and django, so execuse me if this question is simple. I am trying to deploy an existing site to an apache server. For the time being, the site is still in development so I am only deploying it as a virtualhost on my local machine.
I am using Django's WSGI module in the deployment. In my site's config file, I have the following aliases:
Alias /media/ /home/tester/Desktop/siteRootDir/media
Alias /content/ /home/tester/Desktop/siteRootDir/content
WSGIScriptAlias /c /home/tester/Desktop/siteRootDir/deploy/site.wsgi
When I run apache and go to localhost/c I was getting the (13)PermissionDenied error in the apache log. To get around that error, I (admitedly stupidly) ran
chmod -R 777 /home/tester/Desktop/siteRootDir
I know that is not the way to deal with the issue, but I just wanted the site to work so I can continue its development.
So my question is, what are the correct permission settings to the siteRootDir directory and its sub-directories such that the site will run and I do not expose unnecessary files in the directory.
Also, I realize that this is not an ideal set up and I will likely run into problems when I deploy the site in production. Can anyone please suggest a better organizational approach to this?
Thanks!
The tightest permissions possible would be 0600 for files and 0700 for dir's and as a owner the user owning the apache processes. This user differs per OS and flavor (e.g. for OSX it's www, for Debian/Ubuntu it's www-data).
This would probably too tight for a development server. At least would you like to be able to modify all your files through your IDE of text editor, so either you should add ACLs for yourself (i.e. the user that edits the Django files, templates and static files).
Also, in a production server you want the apache user to be able to write to directories that hold web uploaded content. That would be somewhere in your static files section (or on a different dedicated static files server).