Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
267 views
in Technique[技术] by (71.8m points)

php - Ubuntu 14.04 apache2 configuration problems

yesterday i've setted up an Ubuntu 14.04 with php5, Apache2, mysql / mysql-php

Now i try to access my pages - first i've owned all files in my var/ww-directiory, the mainpage of my page worked. Iǘe logged in in the page (self written cms), nothing working now.Chrome tells me an Internal Server-Error (500). but they are no errors displayed.

I've tried to change the php.ini to display errors, but the changes will be ignored.

With service apache2 stop

i have stopped the server, but the server is running... What i have to do to see my errors and top stop the server?

In xampp (windows xp / windows 7, booth) the page workes fine. The page is in use on a real server, there it works fine too.

My .htaccess seems to be ignored (routing engine). If i fill my index.php with "Hello World" (and nothing other) it doesnt work too. But it seems that php is loading my application correctly, it started the session (seen at the cookies) which is started in other file, which is included from index.php.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

An Internal Server Error is probably due to some mistake in your configuration files. That could be either apache2.conf (or any other apache configuration files that get loaded) or php.ini (or any of the additional config files that php loads).

By the way, .htaccess files are disabled by default, and you need to explicitly enable them using apache directive AllowOverride.

Another thing to notice is that, in ubuntu 14.04, you're probably using apache 2.4. There's some slight differences. The first one I've noticed is that site definition files inside sites-available need to end in .conf now.

You can test you config for errors using apachectl configtest (on linux).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...