Have a Vagrantbox with centos 7 and apache 2.4. In /var/www/html have a Codeigniter PHP Site with pretty-url rewrite. I create the vm with puphpet config.yaml. The VM is running correct, VM-server is running correct, mode_rewrite ist activ and allowed to all, but i try a url like this:
http://codeigniter.dev/home ->file not found
http://codeigniter.dev/index.php/home -> site ok
There is no way to replace index.php, don't know why? On my Server with Centos and apache this configrution runs perfect, but in my VM it didn't replace?!?
Here are my Configs:
puphpet/config.yaml
vagrantfile:
target: local
vm:
provider:
local:
box: puphpet/centos7-x64
box_url: puphpet/centos7-x64
box_version: '0'
chosen_virtualizer: virtualbox
virtualizers:
virtualbox:
modifyvm:
natdnshostresolver1: false
showgui: 0
vmware:
numvcpus: 1
parallels:
linked_clone: 0
check_guest_tools: 0
update_guest_tools: 0
machines:
vflm_via243h8nsof:
id: codeigniter
hostname: codeigniter.dev.local
network:
private_network: 192.168.56.101
forwarded_port:
vflmnfp_57zntu84qm8k:
host: '9583'
guest: '22'
memory: '2048'
cpus: '1'
provision:
puppet:
manifests_path: puphpet/puppet/manifests
module_path:
- puphpet/puppet/modules
- puphpet/puppet/manifests
options:
- '--verbose'
- '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
synced_folder:
vflsf_f72ykqm374hd:
source: ./
target: /var/www
sync_type: default
smb:
smb_host: ''
smb_username: ''
smb_password: ''
mount_options:
dir_mode: '0775'
file_mode: '0664'
rsync:
args:
- '--verbose'
- '--archive'
- '-z'
exclude:
- .vagrant/
- .git/
auto: 'true'
owner: www-data
group: www-data
usable_port_range:
start: 10200
stop: 10500
post_up_message: ''
ssh:
host: 'false'
port: 'false'
private_key_path: 'false'
username: vagrant
guest_port: 'false'
keep_alive: '1'
forward_agent: 'false'
forward_x11: 'false'
shell: 'bash -l'
insert_key: 'false'
vagrant:
host: detect
proxy:
http: ''
https: ''
ftp: ''
no_proxy: ''
server:
install: '1'
packages: { }
users_groups:
install: '1'
groups:
- www-data
users:
- www-data
locale:
install: '1'
settings:
default_locale: de_DE.UTF-8
locales:
- en_GB.UTF-8
- en_US.UTF-8
timezone: Europe/Berlin
firewall:
install: '1'
rules: { }
cron:
install: '1'
jobs: { }
apache:
install: '1'
settings:
version: 2.4
user: www-data
group: www-data
default_vhost: true
manage_user: false
manage_group: false
sendfile: 0
modules:
- proxy_fcgi
- rewrite
vhosts:
av_myrx1sclhqnx:
servername: codeigniter.dev
serveraliases:
- www.codeigniter.dev
docroot: /var/www/html
port: '80'
setenv:
- 'APP_ENV dev'
setenvif:
- 'Authorization "(.*)" HTTP_AUTHORIZATION=$1'
custom_fragment: ''
ssl: '0'
ssl_cert: ''
ssl_key: ''
ssl_chain: ''
ssl_certs_dir: ''
ssl_protocol: ''
ssl_cipher: ''
directories:
avd_6sroj6oyuexi:
path: /var/www/html
options:
- Indexes
- FollowSymlinks
- MultiViews
allow_override:
- All
require:
- 'all granted'
custom_fragment: ''
files_match:
avdfm_o1gz78z6saqx:
path: \.php$
sethandler: 'proxy:fcgi://127.0.0.1:9000'
custom_fragment: ''
provider: filesmatch
provider: directory
letsencrypt:
install: '1'
settings:
email: [email protected]
domains: { }
php:
install: '1'
settings:
version: '7.1'
modules:
php:
- cli
- intl
- xml
pear: { }
pecl: { }
ini:
display_errors: 'On'
error_reporting: '-1'
session.save_path: /var/lib/php/session
date.timezone: UTC
fpm_ini:
error_log: /var/log/php-fpm.log
fpm_pools:
phpfp_jncm5era33zg:
ini:
prefix: www
listen: '127.0.0.1:9000'
security.limit_extensions: .php
user: www-user
group: www-data
composer: '1'
composer_home: ''
ruby:
install: '1'
versions:
rv_dpiw29f3bvhv:
default: '1'
bundler: '1'
version: 2.3.1
gems:
- [email protected]
- [email protected]
- [email protected]
python:
install: '1'
packages: { }
versions: { }
nodejs:
install: '1'
settings:
version: '6'
npm_packages: { }
mysql:
install: '1'
settings:
version: '5.7'
root_password: '123'
override_options: { }
adminer: 0
users:
mysqlnu_r5di0ad1ifk2:
name: dbuser
password: '123'
databases:
mysqlnd_k34jv21bgnjk:
name: codeigniter
sql: ''
grants:
mysqlng_rn6tn59qj8nf:
user: dbuser
table: '*.*'
privileges:
- ALL
.htaccess
RewriteEngine On
RewriteBase /
Options +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
VM/ /etc/httpd/conf/httpd.conf
# Security
ServerTokens OS
ServerSignature On
TraceEnable On
ServerName "codeigniter.dev.local"
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
LimitRequestFieldSize 8190
User www-data
Group www-data
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
HostnameLookups Off
ErrorLog "/var/log/httpd/error_log"
LogLevel warn
EnableSendfile Off
#Listen 80
Include "/etc/httpd/conf.modules.d/*.load"
Include "/etc/httpd/conf.modules.d/*.conf"
Include "/etc/httpd/conf/ports.conf"
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
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded
I read a lot of posting for this problem, but no solution, so i hope to get some help here.