where is .htaccess in parallel plesk? should I creat it by myself? - apache

I can't find .htaccess in my root and my host provider is not in touch, either I can't change my host and disable my site, because it's about an reward registration.
now I don't know how could I have .htaccess?
for describtion, I want to active gzip for my site...
I researched in some places and didn't find any useful answer for me...

Actualy there should be a file with name .htaccess on your server's root folder, sometimes it may be empty and you have to write your commands on it! but if there is not, and if your host gave you privilege, you can creat one...

Related

Using same Directory directive for multiple virtual hosts with custom conf files

We have a SaaS product and we give websites for customers. The customers can request to have their own domain pointed to their website. At the moment we use httpd.conf file to add a VirtualHost entry pointing to the same document directory. Afterwards the database will load the website by matching the URL. We have CentOS installed.
I think this is quite risky because if there is a mistake in httpd.conf file their is potential the whole product might not work. This has actually happen. Also, we use WHM and cPanel, so when we add a mod or does a server tweak the entire httpd.conf gets rewritten having us to replace/add existing virtual host entries to the file.
I will need a solution where i can add VirtualHost entries in a separate conf file or multiple conf files and load them via httpd.conf file which should automatically pick the newly added file/files without having to restart the server.
Can someone point me in the right direction where i can achieve the above.
Cheers!
You dont need to restart, just reload

Password Protecting directory using Apache and windows authentication? NOT .htaccess

For part of my assignment, I had to create two local directories in my Apache htdocs path and password protect them so that only one user can access them. I did this using htaccess. However, this was apparently the wrong answer because they wanted authentication using windows user login user/pwd.
I don't understand how i can do this. How can i create a folder that is only accessible by the user with the same name?
Thanks for any advice. I do not need a solution, just some information on where to start looking. Everything I find seems to require htaccess. Unless i am thinking of this wrong and there is a module i can use with htaccess to make this work.
Thanks for the help.
I am not sure what your prof is looking for but you can probably do this by working with the windows folder sharing and permission options
Setting folder Share permissions

.htaccess allow certain ip with file exceptions for all others

I know it's a bit of a beginner question but tried several combinations and none work... here's what i need to achieve using .htaccess and .htpasswd
I have a www.mysite.com/protected folder.
By default, all ip's shouldn't see this folder and any other files inside it exists (basically they should be redirected to www.mysite.com)
A certain IP (my external IP M.M.M.M) should be able to access that protected folder and be requested a username and password
All ip's should be able to see some files inside the folder without being asked for password (www.mysite.com/protected/file1 and www.mysite.com/protected/file2)
I know the latter rule opens an exception on the first but that's how i need it (a general rule denying all and then whitelisting some files)
Thanks in advance for any help, been struggling with this for a bit now :(

Wordpress says .htaccess file is unwriteable, but it's definitely writeable

I've just finished moving a Wordpress site to a new server. The domain has not changed, nor has the directory that Wordpress is installed in; the only thing that has changed is the machine it happens to be on.
The only problem I seem to have had as a result is that my permalinks aren't working, and when I go into the permalink settings, it claims that my .htaccess is unwrittable. For testing sake my .htaccess is currently CHMOD777, so it definitely is.
Any suggestions?
I have experienced problems in changing file permissions through FTP sometimes; CPanel always works. So try doing it from your host's control panel.
If that doesn't work, try editing .htaccess file manually. Follow this link to learn how to.
Your files may be 'owned' by a different user, especially if your hosting provider moved the files for you or if you used a script. If you continue to have problems, ask your hosting provider to check if the owner and permissions are set correctly on the files.
The permalinks themselves aren't working, i.e. the rules already in the .htaccess file from the previous server aren't taking effect. Mod rewrite, header and expire weren't installed. If a moderator wants to delete this silly question please feel free.

How Come Everybody Can See My Private Files?

Sorry for the newbie question...
When I go to http://www.plans4boats.com/scripts/youtubeplayer/ in Google Chrome, I can see a full listing of the files there. What should I do if I don't want any old hacker to just come in and view/copy my source codes? Does it have something to do with htaccess?
I discovered that putting a blank index.html file in the folder helps for THAT folder, but it still leaves all subfolders vulnerable.
What should I google for more information on how to set up my server to prevent this?
Just set Options -Indexes for that particular directories either in an .htaccess file or a <Directory> or <Location> container.
What you need to do is turn of Directory Listing for your specific server. I don't know what server you're using so I can't walk you through it, but just google your server name and how to disable directory listing.
I created a file called .htaccess and put the following contents:
IndexIgnore /