Hot answers tagged

5

It is generally unwise to allow www or apache to have write access, however, this can be done safely by limiting the access to a single directory and not allowing any executables in that directory. For example, the docroot of your php based site is /var/www/example.com You would want your webserver setup so that the only php executable access point is /var/...


2

Take a look at mod_macro, sounds like it may be exactly what you need for your use case.


2

Are you talking about allowing upload of content via the webserver or something else? Regardless you should be ensuring that the permissions are already set up so that your PHP code can only write to designated locations (directories) seperate from your website content. This can be difficult on cheap, shared hosting. Content upload Frank's answer is ...


2

You could try the following (mod_rewrite directives) in the .htaccess file in the document root: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+/)?(?:[^/]+)/([^/]+)$ $1$2 [L] If the requested file does not exist (!-f) then internally rewrite the request by removing the parent directory ((?:[^/]+)) from the URL. $1 is a backreference ...


2

You have no control over the headers of the Google Analytics javascript file, as it is not served by your server. The .htaccess rules you mentioned can only apply to your own files. You'll just have to ignore that particular error, and hope Google make the file a bit more cache friendly in future.


1

Ok, I had to add ServerAlias for each server, didn't think of it because before I had a mod_rewrite rule to remove the www. prefix... <VirtualHost 127.0.0.1:8080> DocumentRoot /var/www/html/afarber.de ServerName afarber.de ServerAlias *.afarber.de ErrorLog logs/afarber.de/error_log CustomLog logs/afarber.de/access_log common </...


1

If you discount that a person has some inside knowledge, the answer is no. How can anyone know about something that they can't see or know about? But what is the point of having these folders if you aren't using some of the content? Assuming you do use the content, unless you are doing some really fancy coding, then you have to link to the content and ...


1

So, my question is: Is there a performance reason to nail virtual hosts to fixed IP specifications? The only performance related reasons for using name based vs ip based is if you've got a limited pool. Name based virtual hosting will not occupy precious IP addresses. The server will be parsing/processing the http headers whether or not you use name ...



Only top voted, non community-wiki answers of a minimum length are eligible