0
工作,我是新來的流浪漢世界:-)mod_rewrite的不遊民
使用的Ubuntu 15.10, 的VirtualBox 5.0, 流浪1.8.1並安裝precise32箱
在我的盒子裏我已經安裝了Apache2,php5和mysql按需要
加載的模塊:
core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_mime mod_negotiation mod_php5 mod_reqtimeout mod_rewrite mod_setenvif mod_ssl mod_status
啓用SSL
流浪虛擬主機SSL文件
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot /vagrant/www
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
我嘗試添加以下代碼我的SSL VirtualHost但仍沒有運氣:-(
<Directory "/vagrant/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
allow from all
</Directory>
Vagrantfile配置:
Vagrant.configure(2) do |config|
config.vm.box = "precise32"
config.vm.network "private_network", ip: "10.0.0.7"
config.vm.synced_folder "~/myvm/www", "/vagrant_data"
end
我的主頁(的index.php)工作正常,但內頁沒有打開,請建議如何配置/啓用.htaccess和mod_rewrite正確地在流浪?
我已經嘗試過,但沒有好運,請參閱我修改的問題並指導我如何解決此問題?謝謝 – zarpio
@zarpio更新了我的答案。如果這不起作用,我的想法就沒有了! –