AllowOverride Not Working – CodeIgniter

I'm attempting to figure out why it is that my .htaccess file isn't working - I'm assuming that I am somehow configuring my 000-default.conf incorrectly.

000-default.conf

<VirtualHost *:80>
        ServerName ****.********.me
        ServerAdmin [email protected]
        DocumentRoot /var/www/html

        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>

        <Directory /var/www/html>
                Options Indexes FollowSymLinks
                AllowOverride All
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

.htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|css|img|js|libs|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

/html is a symlink to /www in my CodeIgniter project. I have removed 'index.php' from $config['index_page'], and the front page of the site loads without any issue. It is when I attempt to access any other page on the site that the issue arises (they will not load unless I add index.php to the beginning of each). I also ran sudo a2enmod rewrite, to no avail. I have also restarted the apache2 service during all of my attempts at fixing the issue. Any ideas?

Virtual Env activate_this.py permission denied

When running the website I get code 500, ant eh output in the apache files at the bottom.

I have changed permissions to have the appache user own the files, and even recursivly chmod 777 all files located in the virtualenv environment.

I can't make any sense of it. I've found a few points of documenation and already attempted what they have done. No success with changing permissions.

Directory showing apache owns the file:

[[email protected] bin]$ pwd
/Envs/AppSiteEnv/bin
[[email protected] bin]$ ls -l
total 60
-rwxrwxrwx. 1 apache domain users 2202 Dec 31 15:50 activate
-rwxrwxrwx. 1 apache domain users 1258 Dec 31 15:50 activate.csh
-rwxrwxrwx. 1 apache domain users 2471 Dec 31 15:50 activate.fish
-rwxrwxrwx. 1 apache domain users 1129 Dec 31 15:50 activate_this.py
-rwxrwxrwx. 1 apache domain users  282 Dec 31 15:51 django-admin
-rwxrwxrwx. 1 apache domain users  141 Dec 31 15:51 django-admin.py
-rwxrwxrwx. 1 apache domain users  310 Dec 31 15:51 django-admin.pyc
-rwxrwxrwx. 1 apache domain users  249 Dec 31 15:50 easy_install
-rwxrwxrwx. 1 apache domain users  249 Dec 31 15:50 easy_install-2.7
-rwxrwxrwx. 1 apache domain users  221 Dec 31 15:50 pip
-rwxrwxrwx. 1 apache domain users  221 Dec 31 15:50 pip2
-rwxrwxrwx. 1 apache domain users  221 Dec 31 15:50 pip2.7
-rwxrwxrwx. 1 apache domain users 9832 Dec 31 15:50 python
lrwxrwxrwx. 1 apache domain users    6 Dec 31 15:50 python2 -> python
lrwxrwxrwx. 1 apache domain users    6 Dec 31 15:50 python2.7 -> python
(AppSiteEnv)[[email protected] bin]$ 

wsgi.py:

import os
import sys
import site

site.addsitedir('/Envs/AppSiteEnv/lib/python2.7/site-packages')

path = '/var/www/Appsite'
if path not in sys.path:
    sys.path.append(path)

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Appsite.settings")

activate_env=os.path.expanduser('/Envs/AppSiteEnv/bin/activate_this.py')
execfile(activate_env, dict(__file__=activate_env))

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Apache Logs:

[error] [client 10.x.x.x] Traceback (most recent call last):
[error] [client 10.x.x.x]   File "/var/www/Appsite/Appsite/wsgi.py", line 29, in <module>
[error] [client 10.x.x.x]     execfile(activate_env, dict(__file__=activate_env))
[Wed Dec 31 16:02:09 2014] [error] [client 10.x.x.x] IOError: [Errno 13] Permission denied: '/Envs/AppSiteEnv/bin/activate_this.py'

.htaccess is not working with ipage hosting

RewriteBase /
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

My .htaccess file is not working in iPage hosting. My web page is written in a MVC Framework (PHP) and the code above is in my public folder. Please help!

www ServerAlias not working Apache2 [on hold]

I am trying to set up my tornado web application to run behind Apache2. The application listens on port 8888, and I am trying to get Apache to forward HTTP requests for the specified domain to this port. Here is my config file:

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName domain.com
    ServerAlias www.domain.com

    ProxyPreserveHost On

    ProxyPass / http://127.0.0.1:8888/
    ProxyPassReverse / http://127.0.0.1:8888/

    ErrorLog /var/log/domain.error.log
    LogLevel warn
    CustomLog /var/log/domain.log combined
    ServerSignature Off
</VirtualHost>

Navigating to domain.com works, but if I try to navigate to www.domain.com, I get Error code: ERR_NAME_RESOLUTION_FAILED.

Any help would be greatly appreciated!

Thanks

Mac OS X macports Apache running wrong version (Yosemite)

I run httpd -V in terminal but I get the wrong version of Apache, macports installed 2.2, but I get 2.4:

Server version: Apache/2.4.9 (Unix)
Server built:   Sep  9 2014 14:48:20
Server's Module Magic Number: 20120211:31
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"

Also I don't see the httpd process when I run either of

sudo port load apache2

or

sudo apachectl start

Also localhost is not accessible.

How can i config xampp so it will not cause the exception too many automatic redirections were attempted on my c# application?

After a long time i found that what cause the exception too many automatic redirections were attempted on my c# application was the xampp that was running in the background. I need to use the xampp so i wonder how can i config it maybe so it will not disturb the c# application.

I have xampp Version 3.2.1 when i make start on the apache i see:

PID(s)    Port(s)
10424     
6136      80,443

My program on csharp using simple WebClient to download a file each X minutes. In the last week or so i had a problem every time i got an exception: too many automatic redirections were attempted in my csharp application.

Now today about an hour ago once i clicked on stop in the xampp to stop the apache everything in the csharp application is working fine no more this exception: too many automatic redirections were attempted.

The question is how can i run both xampp and my cshap application so they will not conflict ?

How can I use .htaccess to change url


I am looking for a solution to my dilemma here.
I would like to change a url like this:
http://www.example.com/listing/this-is-my-page.html

to something like:
http://www.example.com/listing/this-is-my-page/

yet still bring in the page located at:
http://www.example.com/listing/this-is-my-page.html

I would like to do this with an .htaccess file. Is this possible or am I barking up the wrong tree?

Sending redirect in oc4j web application behind a Apache 2 proxy (mod_proxy)

I have two web applications (ADF) deployed on OC4J container http://server:8181/app1 and http://server:8181/app2

I have configured an Apache 2 (mod_proxy) to act as reverse proxy offloading SSL. Thus the users will access the app over https://server/app1 which will serve the content from oc4j web app url above.

ProxyPreserveHost off
ProxyPass / http://server:8181/
ProxyPassReverse / http://localhost:8181/

The app1 has a redirect of form sendRedirect("../app2") which works fine when accessing the oc4j server directly. When accessing over Apache, the redirect results in the following url in my browser http://app2. Notice the protocol is now changed to http and server name is missing.

Is there a way to fix this without causing a change in application code?