apache

Finding out what user Apache is running as?

I want to secure a file upload directory on my server as described beautifully here, but I have one problem before I can follow these instructions. I don't know what user Apache is running as. I've found a suggestion that you can look in httpd.conf and there will be a "User" line, but there is no such line in my httpd.conf file, so I gu...

Serving uploaded images securely in Django?

Hi there, My Django site lets users upload images. It's running on Apache. Files are uploaded via a FileUpload form. The folder to which files are uploaded is outside the Django project, and protected as described here, i.e. the folder has 755 permissions and files have 644 permissions. I now want to serve the images up to users - b...

Apache/PHP - alias outgoing URL

In my PHP code I've got references to a URL on another website. I'm testing my website locally (using XAMPP). Is it possible to get Apache to automatically replace the domain of this other website for localhost? For example my PHP code might be: <?php echo "<a href='http://www.othersite.com'&gt;Click me</a>"; ?> And I'd like for my...

ntlm tomecat module on linux? http://tomcatspnego.codeplex.com/

Any one has experience with this? http://tomcatspnego.codeplex.com/ ...

How do I rewrite a URL based on a dynamic first directory name?

My goal is to redirect: http://users.domain.com/&lt;username&gt;/other/path/info to http://users.domain.com/other/path/info The key here is that that the "username" in the source URL could of course be anything. Here is a more concrete example of what I want to do (and why): Suppose I have username of "bill". I want Bill to be ab...

Apache url rewrite problem

requests -----> should be written to new url /institute/dps -----> /institute.php?slug=dps /institute/abc -----> /institute.php?slug=abc /institute/123 -----> /institute.php?slug=123 I am using following rule in .htaccess RewriteRule ^institute/(.*)$ /institute.php?slug=$1 However, it's not working. the page insitute.php g...

What are some good web development blogs?

I'm just getting into some basic web development (just a personal homepage for now, but I have plans for bigger things once I know the basics). I find that blogs can be quite helpful in getting into the mindset of a particular activity, so I was wondering if anyone knew some good ones. I'm particularly looking for education blogs i.e. on...

Why doesn't eAccelerator cache to harddrive?

Hi! When looking at the set folder in php.ini for eAccelerator to use, nothing is there. No hidden files as well. Directory is writable as well: eaccelerator.cache_dir = "c:/wamp/tmp/eaccelerator"' Also got the following settings in php.ini to allow disc cache: eaccelerator.disk_size="12" eaccelerator.keys="disk_only" eaccelerator.s...

PHP on Windows: Apache or IIS7?

Here's the thing: Due to a new project, I have to learn PHP from scratch. I'm now in windows and I DON'T want to change quickly, so, don't tell me to change. I need to setup a DreamWeaverCS4/PHP5 develop environment, and, I don't have a clue whether to use Apache or IIS7. I just need some advice relating to it. Remarks: I really don'...

Can Apache configuration check cookies?

My situation: We have a mobile version of our website, and want to start redirecting mobile users to it. The plan is to do this in Apache httpd.conf or .htaccess, using something like this: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|...) RewriteRule (.*) mobile/$1 However we want there to be a way for users t...

BASH apache to seek particular file name

i want to find every log file named 'justjoe_log', on an apache server. I want to delete them all. how do i do it ? ...

How do we protect our Wordpress from hacker ?

it's can be apply not only to wordpress. But to all blog platform that can be installed into a server and shared host. so, What do you do via PHP coding or pluggin or any method to secure your installation ? ...

How we create .htaccess for IIS ? Is it possible ?

i don't know much about IIS, except it's a web server (just like apache) and mostly run for ASP. How we set library like moD_rewrtie and .htaccess in this kind of server? ...

Apache RewriteRule: it is possible to 'detect' the first and second path segment?

Im really really a newbie in regexp and I can’t figure out how to do that. My goal is to have the RewriteRule to 'slice' the request URL path in 3 parts: example.com/foo #should return: index.php?a=foo&b=&c= example.com/foo/bar #should return: index.php?a=foo&b=bar&c= example.com/foo/bar/baz #should return: index.php?a=foo&b=bar&c=ba...

How to redirect or show a page rather than "Forbidden" when i have directory listings off (htaccess/unix)

Hi, I've set it in htaccess so it won't display the contents of directories, rather it will just show the usual Forbidden page. how can i either: show a certain page or redirect to a certain page rather than just this default "Forbidden" page? thanks ...

JBoss Tomcat issue: "[engine] standardhost[localhost]: MAPPING configuration error for request URI" and "No context configured to process this request"

Hi I am trying to run a system deployed on a linux machine - built over jboss. I have ran jboss services but it is constantly giving these two errors: When I try to open home page: http://localhost/ - it gives following errors: "[engine] standardhost[localhost]: MAPPING configuration error for request URI" and "No context configured t...

I want to better organize my website files, but I can access the .php files using the folder heirarchy. How can I override that?

For example, to access a page in my search folder, I have to write: mywebsite.tld/search/searchJob.php I don't want users to have to write down folder structure and whatnot. What can I do to change this? OR, is there a better way to organize my files? Because I'm only two pages in and I decided to move some files and got lost in the h...

Is this the way I'm supposed to be use mod_rewrite or do I have redundant lines?

Here's what I have: <VirtualHost 127.0.0.1> DocumentRoot D:\XAMPP\xampp\htdocs\mysites\tupega.com ServerName tupega.tld <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^/nuevoanuncio$ /create/nuevoanuncio.php </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^/regis...

With Apache/mod_wsgi how can I redirect to ssl and require Auth?

I have a Media Temple DV server hosting dev.example.com with django mounted at /. There is a legacy directory in my httpsdocs I need to continue to serve at /legacy. But for this directory I need to redirect anyone coming over http over to https, then prompt for http basic auth. In the virtual host conf, I'm pointing the root to a djang...

How to make a file extension downloadable?

I'm trying to download http://www.downway1.com/dota/eng/DotA%20Allstars%20v6.67.w3x this file. But it's not able to download. It's opening unknown text. How I can set it up? Maybe I can use htaccess? but how ? ...