apache2

How do I disable suphp on ubuntu 10.04 server

£可爱£侵袭症+ 提交于 2020-01-05 07:42:26
问题 I have put together a small ubuntu 10.04 server with apache2 and php for use only for testing purposes. I am finding suphp keeps getting in my way. Doubtless this is a useful tool for security etc, but right now, as this is only a local testing ground I would like to disable it to prevent it continually throwing errors relating to file ownership etc. So, as the title says: How do I disable suphp on ubuntu server 10.04. Thanks 回答1: a2dismod suphp -> to disable su php mod 回答2: instead of

Directory rewrite in .htaccess to another directory

自闭症网瘾萝莉.ら 提交于 2020-01-05 03:46:37
问题 I have .htaccess that does this: https://example.com/john shows the contents of the directory https://example.com/user/index.php?username=john RewriteRule ^([a-zA-Z0-9_-]+)$ /user/index.php?username=$1 [QSA] How can I make it so https://example.com/john/blah will show the contents of https://example.com/user/blah ? Only show contents of /user folder if my previous rewrite rule was applied. For example: example.com/john/haha ---> example.com/user/haha example.com/privacy/blah ---> // Will show

mod_rewrite rule not working

試著忘記壹切 提交于 2020-01-04 05:46:27
问题 I have the following rules in my htaccess: RewriteRule ^([^/.]+)/?$ list.php?categoryShortForm=$1&locationShortForm=world [QSA] RewriteRule ^([^/.]+)/([^/.]+)/?$ list.php?categoryShortForm=$1&locationShortForm=$2 [QSA] RewriteRule ^([^/.]+)/([^/.]+)/[^/.]*-p([0-9]+)/?$ view.php?categoryShortForm=$1&locationShortForm=$2&postingId=$3 [QSA] In my localhost (windows, xampp), it all works fine. In my real server (linux, apache) the first 2 rules work fine, but not there 3rd one. For example:

HTTP request dispatch from Web Server to a CGI/FastCGI process

情到浓时终转凉″ 提交于 2020-01-04 05:39:08
问题 To gain more understanding of how HTTP requests are handled in case of web apps, how does a web server like Apache, dispatch a request to one of its Virtual Hosts? What are the initial programs executed irrespective of the framework (Rails/PHP/Java)? I would appreciate if someone can list the steps taking example of Rails (as I know Rails). Thanks in advance! 回答1: Ah, couple of good rails specific articles that explain most of what I wanted wanted to know: http://railsguts.com/initialization

Redirect to trailng slash (htaccess)

前提是你 提交于 2020-01-04 05:21:25
问题 Trying to add trailing slash to every link. i.e. http://mysite.com/products should make 301 redirect to http://mysite.com/products/ etc. But how? Here is htaccess: RewriteEngine on DirectoryIndex index.php Options -Indexes RewriteBase / RewriteCond %{REQUEST_URI} \.css$ RewriteCond %{QUERY_STRING} ^pack$ RewriteRule ^(.*)$ /modules/system/css_compactor.php?filename=$1 [L] RewriteCond %{REQUEST_URI} \.js$ RewriteCond %{QUERY_STRING} ^pack$ RewriteRule ^(.*)$ /modules/system/js_compactor.php

Apache Apr and Apr-util installlation?

偶尔善良 提交于 2020-01-04 04:30:07
问题 I am installing Apache for first time in ubuntu 12.04 and i looked up in the link Compiling and installing apache It says we should have APR and APR-util first i follow the procedure and untar them into /usr/local/srclib/apr and /usr/local/srclib/apr-util directory. Every where it is written ./configure's --with-included-apr Now i just do ./configure in /usr/local/srclib/apr after that i do ./configure in /usr/local/srclib/apr-util then it throws me error configure: error: APR could not be

Enabling data compression for Apache2 + FastCGI setup

泄露秘密 提交于 2020-01-04 02:34:31
问题 This Question is Related to my earlier post here: CSS loading issue with Android ICS. Where I was facing issue with CSS and JS rendering by Android ICS's default and Dolphin browser . This content is served from my Server's Backend Engine, Which uses ( Apache2 + FastCGI + Python ) setup. While searching for possible problems, I found that main cause for problem was, content was NOT sent in compressed form from Server. So sample Response Header looks something as follows: Connection Keep-Alive

Changed the AllowOverride to All and still nothing

匆匆过客 提交于 2020-01-03 11:45:12
问题 I tried to write a .htaccess file on my local pc's website, I've realized I need to set AllowOverride All instead of None searched, found the file /etc/apache2/conf.d/security in the file I found #<Directory /> #AllowOverride None #Order Deny,Allow #Deny from all #</Directory> changed it to <Directory /> AllowOverride All Order Deny,Allow Deny from all </Directory> typed service apache2 restart and... .htaccess still didn't work :I the file by the way, holds one line, deny from all. 回答1:

DirectoryIndex doesn't work

我的梦境 提交于 2020-01-03 10:58:27
问题 I use apache2 to host a site. There are both index.html and index.php in my directory. I open the /etc/apache2/apache2.conf and add a line: DirectoryIndex index.php index.html index.htm Then restart apache2. But when I open localhost/~username , it accesses the index.html. I look around but can't find problem. My httpd.conf is empty and I don't have .htaccess file. Where may the setting hide? Edit : After I modified /etc/apache2/mods-availiable/dir.conf , it finds the index.php. But WHY the

mod_rewrite rules for clean URLs with optional parameters

僤鯓⒐⒋嵵緔 提交于 2020-01-03 04:01:07
问题 I have the current URL: http://domain.com When you visit this URL it by default loads: http://domain.com/index.php In my .htaccess I have: Options +FollowSymLinks RewriteEngine On RewriteRule ^([^/]*)$ /index.php?var1=$1 [L] RewriteRule ^([^/]*)/([^/]*)$ /index.php?var1=$1&var2=$2 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /index.php?var1=$1&var2=$2&var3=$3 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /index.php?var1=$1&var2=$2&var3=$3&var4=$4 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/