Hey guys I have one folder which I like to keep my backups in its on my Desktop. I use it to backup to the Cloud etc.
My XAMPP site is in c:/xampp/htdocs/mysite
What I want is to have that mysite folder inside my Desktop folder so i can backup it one push /w all my other stuff, I could move the whole XAMPP directory into my Desktop folder but then i need to setup transfer filters so I don't backup all the necessary XAMPP folders .etc
Is this possible?
Open the httpd.conf file of your apache server and find the settings related to this variable "DocumentRoot".
You will find it similar to this.
DocumentRoot "D:/wamp/www/"
Then replace the current folder path with the path to the folder you needed as the new document root and restart the server.
Related
I have htdocs/myproject/web folder but I cannot access that web folder, i can access all others folders inside htdocs/myproject/. It doesn't show when I open localhost in web browser and it shows folder structre. Other folders are showing, where could be problem ? .. This project is downloaded from SVN.
You could check if there is a .htaccess file in the directory where indexing is disabled (for example Options -Indexes).
I am trying to connect to a remote PostgreSQL database via VBA. I read here about the Database server configuration to make this possible but i cannot find the configuration files in cPanel file manager(I am new to cPanel).
It says in the article that i can find the pgsql config file here /var/lib/pgsql/data but i do not see a var folder in the root folder.
You can NOT access your /var directory through cPanel file manager. cPanel file manager has limited directory access and due to that you can not access /var folder which is present outside the cPanel user home directory
You will have to access your server with root user through SSH and then try to access /var/lib/pgsql/ directory
I have a dropbox account which sync all my website folders. and it works well on windows using my apache to test, because apache can find the directory. I have another development computer using Ubuntu 13, and i changed the document root in apache to /home/jacques/dropbox but it cant find the directory , so i opened my home folder. i saw the directory there, so i tried to access it using the terminal, it said that the directory doesnt exist.
I did right click dropbox and that said that the directory is in /home/dropbox and /home/jacques/dropbox
am i missing something important here ?
There are a few things to check here -
First is that on Ubuntu the default Dropbox directory is
/home/username/Dropbox not /home/username/dropbox. Note the capital
'D', linux file systems are case-sensitive. Make sure that you specify it with the capital D in the DocumentRoot declaration.
The second is to check what user Apache is running as and making
sure that it has permissions to view your Dropbox directory. On
Ubuntu, the default is www-data, so you might want to add yourself
to the www-data group and change the group on the Dropbox folder to
be www-data.
Alternatively, you can change the user and group that Apache runs as by editing the /etc/apache2/envvars file and by making
these edits:
export APACHE_RUN_USER=jacques
export APACHE_RUN_GROUP=jacques
You will need to restart Apache after this, and you may need to update the owner of the /var/log/apache2 directory to be you also.
Whenever I create an .htaccess file in a directory it disappears. I am running a VPS at Digital Ocean (I have full control over the server). So I can't see why my .htaccess files are automatically deleted upon creation. I even tried to make the file on my computer and just transfer it to the directory via FTP but as soon as it transfers, it disappears. I checked the log of the FTP transfer and the file transferred successfully. I can't figure this out.
Its because system files are hidden on apache servers... Either select the option to see hidden files if you're using a GUI or type the command "ls -a" if you're on terminal and you should see the files. Any file that starts with a dot is going to be hidden by default. Your .htaccess files fall within the same category.
If you want to be able to view the .htaccess file on the server, make sure you are logged in as the root user, or a user with root level permissions.
Then, navigate yourself to "/home/username/public_html(in my case)" And if you have a .htaccess file uploaded, it should be displayed there.
I have two folders for a particular web site. There is the main www.mysite.com site which is at home/user/public_html and then I have a sub domain -> dev.mysite.com for the latest under development version of the site at /home/user/dev_html
Maybe because of laziness in the past when moving the new site to the main directory, I have just backed up the current site, downloaded it via ftp, erased the site files and then uploaded the new site. However, ftp is so slow and unreliable that this is a ridiculously slow and error prone way of doing it - especially for big sites.
So I was thinking of just logging in via ssh and then moving all the files out of public_html and then copying the new files from dev_html but then it struck me. Can't I just change the name of the public_html folder to something like public_html_old and then change dev_html to public_html? Will Apache go mental if I do this?
Forgive me if this is a stupid question.
What you propose is fine. In fact, you can do it in one line from the CLI.
mv public_html public_html_old && mv dev_html public_html
You can also try the following...
Create a symbolic link to the current main site, eg (assuming the current site resides in a v1_html directory)
ln -s v1_html public_html
Then, to switch document roots...
rm public_html && ln -s v2_html public_html
If you can access the server in SSH, you can use cp command to copy your directory files to public_html or rename the folder as you suggested.
Be sure to stop the Apache service first.