[Question] [Apache] Em config sai chỗ nào? |
21/11/2007 00:50:18 (+0700) | #1 | 98903 |
toantoet
Member
|
0 |
|
|
Joined: 03/02/2004 07:41:54
Messages: 31
Offline
|
|
<VirtualHost *:80>
RewriteCond %{REQUEST_URI} !^/trac.*
RewriteEngine On
RewriteRule ^/(.*) \
http://localhost:8081/VirtualHostBase/http/localhost:80/plone/VirtualHostRoot/$1 [L,P]
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /opt/trac
AuthType Basic
AuthName "LDAP"
AuthBasicProvider "ldap"
AuthLDAPURL "ldap://localhost/dc=example,dc=com?sn?"
authzldapauthoritative Off
require valid-user
</Location>
</VirtualHost>
Các anh xem em config đã đúng chưa? Đoạn code này em chạy trên linux thì không vấn đề gì, chuyển sang win down thì đoạn rewrite ko chạy được, nó luôn luôn chạy vào Plone.
Em muốn tất cả các request bắt đầu bằng "trac" http://localhost/trac) thì sẽ được chuyển sang TRAC, còn lại thì sẽ chuyển sang Plone.
Giúp em với nhé. |
|
|
[Question] Re: [Apache] Em config sai chỗ nào? |
21/11/2007 12:36:30 (+0700) | #2 | 99029 |
toantoet
Member
|
0 |
|
|
Joined: 03/02/2004 07:41:54
Messages: 31
Offline
|
|
Em fix được rồi, đoạn code này dùng trên XAMP thì không được, chắc do XAMP config gì đó. |
|
|
[Question] Re: [Apache] Em config sai chỗ nào? |
21/11/2007 15:03:19 (+0700) | #3 | 99055 |
![[Avatar] [Avatar]](/hvaonline/images/avatar/a7c6d9a58a47a1e771142c96f76a128c.jpg)
|
canh_nguyen
Elite Member
|
0 |
|
|
Joined: 23/08/2004 18:55:09
Messages: 775
Location: Broken dream
Offline
|
|
#LoadModule rewrite_module modules/mod_rewrite.so
Mở file httpd.conf của apache của XAMPP bỏ dấu đi#, mặc định XAMPP không load mod_rewrite. |
|
|
[Question] Re: [Apache] Em config sai chỗ nào? |
21/11/2007 15:13:11 (+0700) | #4 | 99056 |
toantoet
Member
|
0 |
|
|
Joined: 03/02/2004 07:41:54
Messages: 31
Offline
|
|
Cám ơn sự giúp đỡ của anh, nhưng theo em nghĩ thì không phải vậy. Nếu mod_rewrite chưa bật thì khi run apache sẽ bị lỗi tại "RewriteEngine On". Tiếc là bây giờ em lại ko có máy để kiểm tra, để sáng mai vậy |
|
|
[Question] Re: [Apache] Em config sai chỗ nào? |
21/11/2007 22:48:15 (+0700) | #5 | 99082 |
subnetwork
Member
|
0 |
|
|
Joined: 05/09/2004 06:08:09
Messages: 1666
Offline
|
|
toantoet wrote:
Cám ơn sự giúp đỡ của anh, nhưng theo em nghĩ thì không phải vậy. Nếu mod_rewrite chưa bật thì khi run apache sẽ bị lỗi tại "RewriteEngine On". Tiếc là bây giờ em lại ko có máy để kiểm tra, để sáng mai vậy
Bro mở tập tin cấu hình Apache tìm dòng
#LoadModule rewrite_module modules/mod_rewrite.so
Thay thế thành LoadModule rewrite_module modules/mod_rewrite.so
Tìm tiếp dòng
DocumentRoot "C:/Webserver"
Thay đổi giá trị cho phù hợp
Quan trọng giá trị AllowOverride trong Directory
<Directory />
Options All
AllowOverride All
</Directory>
Good luck |
|
Quản lý máy chủ, cài đặt, tư vấn, thiết kế, bảo mật hệ thống máy chủ dùng *nix
http://chamsocmaychu.com |
|
Users currently in here |
1 Anonymous
|
|
Powered by JForum - Extended by HVAOnline
hvaonline.net | hvaforum.net | hvazone.net | hvanews.net | vnhacker.org
1999 - 2013 ©
v2012|0504|218|
|
|