Solved

Desperate Apache Help Please!

Posted on 2009-07-09
4
276 Views
Last Modified: 2012-05-07
I am getting desperate. I want to do something that seems very simple but no one is giving me much of any expert advice.

I just changed my setup so that I can just have PHP perform my redirects or aliasing.

I cant get mod rewrite to just simply pass anything that it receives to index.php. I get this response from the server when trying to use what I have

The requested URL /dtcore/hits/go/plan/1791/ was not found on this server.

Any Help Appreciated


#####################################  Apache 2.2

# =================================================

# Basic settings

# =================================================

ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"

# =================================================

# Performance settings

# =================================================

Timeout 300

KeepAlive Off

MaxKeepAliveRequests 100

KeepAliveTimeout 15

# =================================================

# General settings

# =================================================

Listen 80 

Listen 443

ServerAdmin [REMOVED]

ServerName [REMOVED]

UseCanonicalName Off

ServerSignature On

HostnameLookups Off

ServerTokens Full

DirectoryIndex index.html

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

# =================================================

# Apache modules

# =================================================

### Dynamic Modules

LoadModule infinity_security_module modules/mod_infinity_security.so 

LoadModule alias_module modules/mod_alias.so

LoadModule asis_module modules/mod_asis.so

LoadModule auth_basic_module modules/mod_auth_basic.so

LoadModule authn_default_module modules/mod_authn_default.so

LoadModule authn_file_module modules/mod_authn_file.so

LoadModule authz_default_module modules/mod_authz_default.so

LoadModule authz_groupfile_module modules/mod_authz_groupfile.so

LoadModule authz_host_module modules/mod_authz_host.so

LoadModule authz_user_module modules/mod_authz_user.so

LoadModule dir_module modules/mod_dir.so

LoadModule env_module modules/mod_env.so

LoadModule log_config_module modules/mod_log_config.so

LoadModule mime_module modules/mod_mime.so

LoadModule negotiation_module modules/mod_negotiation.so

LoadModule setenvif_module modules/mod_setenvif.so

LoadModule ssl_module modules/mod_ssl.so

LoadModule security2_module modules/mod_security2/mod_security2.so

LoadModule unique_id_module modules/mod_unique_id.so

LoadModule php5_module "C:/PHP/php5apache2_2.dll"

LoadModule rewrite_module modules/mod_rewrite.so 
 

# ================================================

# ModSecurity Settings

# ================================================

SecRuleEngine On

SecRequestBodyAccess On

SecAuditEngine On

SecAuditLogType Serial

SecAuditLog var/logs/security.log

SecAuditLogParts "AHZ"
 

SecArgumentSeparator "&" 

SecRequestBodyInMemoryLimit 131072

SecDebugLog var/logs/debug.log

SecDebugLogLevel        0

SecDataDir var/uploaded/data

SecTmpDir var/uploaded/tmp

SecGeoLookupDb ../var/geoip/GeoLiteCity.dat

# ================================================

# ModSecurity Rules

# ================================================

# default rule

SecDefaultAction log,auditlog,deny,status:403,phase:2

# ================================================

# Capture ModSecurity Data into ModInfinity

# ================================================

[REMOVED]

# ================================================

# ModInfinity Settings

# ================================================
 

# ================================================

# ModRewrite Settings

# ================================================

RewriteEngine On

RewriteRule ^([^/.]+)/?$ /index.php [L]

# =================================================

# Access control

# =================================================

<Directory />

    <FilesMatch "^\.ht">

    	Order allow,deny

    	Deny from all

    	Satisfy All

    </FilesMatch>	

    Options None

    AllowOverride All

    Order deny,allow

    Deny from all

</Directory>

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">

    Options -FollowSymLinks

    AllowOverride All

    Order allow,deny

    Allow from all

</Directory>
 

# =================================================

# Logs

# =================================================

LogLevel warn

<IfModule log_config_module>

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    LogFormat "%{Referer}i -> %U" referer

    LogFormat "%{User-agent}i" agent

    ErrorLog "var/logs/www-error.log"

    CustomLog "var/logs/www-access.log" combined

</IfModule>

# =================================================

# Virtual hosts

# =================================================

NameVirtualHost *:80

# development host

<VirtualHost *:80>

    ServerAdmin [REMOVED]

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/devcore"

    DirectoryIndex index.php

    ServerName [REMOVED]

    ServerAlias [REMOVED]

    ErrorLog "var/logs/devcore-error.log"

    CustomLog "var/logs/devcore-access.log" combined

</VirtualHost>

# www host

<VirtualHost *:80>

    ServerAdmin [REMOVED]

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/"

    DirectoryIndex index.php index.html

    ServerName [REMOVED]

    ServerAlias [REMOVED]

    ErrorLog "var/logs/www-error.log"

    CustomLog "var/logs/www-access.log" combined

</VirtualHost>

<VirtualHost [REMOVED]:443>

    ServerAdmin [REMOVED]

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/"

    DirectoryIndex index.php index.html

    ServerName [REMOVED]

    ErrorLog "var/logs/www-error.log"

    CustomLog "var/logs/www-access.log" combined

    SSLEngine on

    SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].crt"

    SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].key"

    SSLCertificateChainFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].bundle.crt"

</VirtualHost>

<VirtualHost [REMOVED]:443>

    ServerAdmin [REMOVED]

    DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/site_partners/"

    DirectoryIndex index.php index.html

    ServerName [REMOVED]

    ErrorLog "var/logs/partner-error.log"

    CustomLog "var/logs/partner-access.log" combined

    SSLEngine on

    SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].crt"

    SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].key"

    SSLCertificateChainFile "C:/Program Files/Apache Software Foundation/Apache2.2/certificates/[REMOVED].bundle.crt" 	

</VirtualHost>

# =================================================

# SSL

# =================================================

<IfModule ssl_module>

SSLRandomSeed startup builtin

SSLRandomSeed connect builtin

AddType application/x-x509-ca-cert .crt

AddType application/x-pkcs7-crl    .crl

SSLSessionCache "shmcb:C:/Program Files/Apache Software Foundation/Apache2.2/logs/ssl_scache(512000)"

SSLSessionCacheTimeout  300

SSLMutex default

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL                 

</IfModule>

# =================================================

# Other

# =================================================

PHPIniDir "C:/PHP"

Open in new window

0
Comment
Question by:dilithiumtoys
  • 2
  • 2
4 Comments
 
LVL 42

Expert Comment

by:David S.
ID: 24820700
^([^/.]+)/?$   won't match "/dtcore/hits/go/plan/1791/".

I suggest you use this instead:    ^([^/.].*)/?$
0
 

Author Comment

by:dilithiumtoys
ID: 24820760
I tried using that and I still get the same response. I want to send anything and everything to index.php

I did update the conf to reflect what you said.

RewriteEngine On
RewriteRule  ^([^/.].*)/?$ /index.php [L]
0
 
LVL 42

Expert Comment

by:David S.
ID: 24820785
Try it like this then:

^/([^/.].*)/?$
0
 

Accepted Solution

by:
dilithiumtoys earned 0 total points
ID: 24820815
No go. Same response.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
setting up tomcat for external access 4 69
instanceof  operator in java 26 85
Redirect and Rewrite URL using .htaccess 38 114
apache vhosts on mac not being recognized 5 69
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now