apache

php apache root write permission

Can i write /etc/apache2/ directory. I want to create a file with php and apache. But i must root. Is there a way to sudoers? Can do this? ...

How do I write to the apache log files when using mod_wsgi

I have a Django project where I have been logging to a file using the standard library logging module. For a variety of reasons I would like to change it so that it writes to the Apache log files. I've seen quite a bit of discussion of how to do this with mod_python, but not mod_wsgi. How do I do this for a project running under mod_w...

Multiple VirtualHosts files for same ServerName in Apache

I have a subdomain with many projects. Also, for some reason (don't ask me why) I have separate Location directives for each subfolder under that subdomain. This project folders are created dynamically through a bash script, along with an Apache VirtualHost file. So let's say I create another project, it would be at subdomain.mydomain.c...

Is there a more efficient way to code this .htaccess file?

Is there a more efficient way to code the .htaccess file I have included below? Also, is the order of all the different elements ok? One user described the file as the "bushiest" htaccess he had ever seen, so I want to learn how I can make it better. Thanks in advance! <FilesMatch "(phpinfo|configurations).php$"> AuthName "Restrict...

redirect an internal IP from HTTP to HTTPS with Apache

Hey all- I have looked this up on here and Google but none of the suggestions seem to be working for me. I'm working on an internal site at this point so the endpoints are IPs vs URLs. Accessing the site via HTTPS works, but HTTP just says "Cannot establish a connection". I can't seem to find anything in the logs that explains why. I...

.htaccess mod_rewrite help!

Just want to say if anyone can help me it would be most appreciated, I have been looking for hours trying all different things with no luck. I basically want to hide the .php extension and add a trailing slash which I've managed to do. But if someone goes to file.php it still loads and does not redirect to /file/ also /file// still lo...

Installation problem with Apache Thrift

I am trying to install thrift in solaris, so I can play with it. But unfortunately, I can't get configure working. Here is the command I use to configure. ./configure --prefix=<> CFLAGS='-m64 -O3' CXXFLAGS='-m64 -O3' --with-boost= I get this error as follows. checking for boostlib >= 1.33.1... configure: error: We could not detect the...

httpd AddType directive

Is there a way to just have php parsed in a single file rather than in all files ending in a particular extension? For example, I know that AddType application/x-httpd-php .html will parse all .html files using the php parsing engine But I want to only parse abc.html and not anythingelse.html I am thinking this is the directive Add...

Starting and Stopping Apache with sudo

I can run apachectl fine as a regular user, but when I sudo apachectl, I get sudo: apachectl: command not found. Any thoughts? I have the apache /bin directory in my path. ...

Apache SSL multi domain

We have a web application that hosts multiple websites for our customers under different domains. All these domains are hosted on an single apache vhost, the logical seperation into different sites is done by the software. We would like to offer ssl-support for some of these virtual websites. Pricipically that should be no problem, as a...

htaccess code to set QSA for all redirects automatically (globally)

Firstly, this is the current setup, so that you understand where I am at the moment... If I go this url: http://website.com/login/ The server redirects to this script: http://website.com/page.php?section=login I have the follow htaccess redirect set up to do this: RewriteRule ^([a-zA-Z0-9_]*)/$ page.php?section=$1 [QSA] That my...

Slow loading a site on godaddy.com (linux host)

Hi all, I have a site with a subdomain say www.foo.com with abc.foo.com as a subdomain. When accessing the subdomain it would take ages to load. I then checked and disabled .htaccess in the root and then it seems to load quite quickly. All i have in my .htaccess is, ErrorDocument 403 /error-docs/403.shtml ErrorDocument 404 /error-docs...

Enabling gzip compression for JBoss cluster with mod_jk load balancer

We have a JBoss configured in cluster with Apache HTTP+mod_jk as a load balancer. Do we need to configure anything on Apache side in addition to configuring compression in JBoss configuration for connector? ...

Reverse proxy not keeping the original domain name

Hello All, I want to do something like this: Domain1 = www.abc.com Domain 2 = www.xyz.com When someone goes to www.abc.com it should go to www.xyz.com/directory/1 I have this configuration in my apache 2.2 ( yes it has mod_proxy ) <VirtualHost *:80> ServerName www.abc.com ProxyRequests Off ProxyPass / http://www.xyz.com...

How do I redirect to domain name without the trailing /

Currently, if I go to my site... example.com OR example.com/index.php ...I am redirected to... example.com/ However, I would like to stop the addition of the training / when visiting the main page. The following is my htaccess file... IndexIgnore * ErrorDocument 400 /error ErrorDocument 401 /error ErrorDocument 4...

apache mod_rewrite redirect between hostnames (except one directory)

I've got two hostnames (e.g. www.site1.com and www.site2.com) mapped to the same apache virtual host. I'd like to redirect all traffic from site1.com over to site2.com, except for all POST requests from a particular folder. (That folder contains URLs which are used by older clients which are not capable of handling redirects on POST req...

Intermittent problem with UTF-8 characters

I am running a fairly standard LAMP stack. The problem is an intermittent rendering of UTF-8 characters correctly. About 50% of the time the non-ASCII UTF-8 characters render correctly (e.g. with appropriate diacritical marks), but about 50% of the time I get the '?' rendition instead. If I reload the page, sometimes it corrects the pro...

Apache 403 Error

I can access certain links from my site with no issue. However, if I try and manually type in the same URL as the link/button I get a 403 error. FOr instance http://www.sumobid.com/logout.php I have verfied the permissions on the file but am still getting the error. This is on a dedicated server. Any ideas? ...

.htaccess multiple authorization for sub-child directories

I'm looking to edit my .htaccess file to control AuthTypeBasic for it's own directory and child directories differently. I currently have password protection (AuthType Basic) set up on the a folder and would like to set up some of the children directories to be exempt from this password protection and other child directories to have uni...

How do I get google to display my link as example.com NOT example.com/

Currently google shows my site link as... example.com/ ...however, I would like it to be displayed as... example.com I do have the following meta data <link rel="canonical" href="http://example.com" /> ...and the following is my htaccess file... IndexIgnore * ErrorDocument 400 /error ErrorDocument 401 /error ErrorDocument ...