[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Reverting back to apache2 from lighttpd: have issues



On Mon, 2014-03-24 at 21:52 -0400, Jerry Stuckle wrote: 
> On 3/24/2014 9:31 PM, John W. Foster wrote:
> > On Mon, 2014-03-24 at 14:30 -0400, Jerry Stuckle wrote:
> >> On 3/24/2014 12:45 PM, John Foster wrote:
> >>> I have been trying to get lighttpd to run as my web server but was not
> >>> able to get it properly configured. I kept getting an error message
> >>> saying that localhost was not configured properly and I could not use
> >>> the simple browser url  "http://localhost to open the server. I decided
> >>> to reinstall apache2 & as I had totally removed ALL of apache2 even any
> >>> references to it; the new install was pristine from Debian stable. It
> >>> fired up but I'm still getting the same error when I try to use
> >>> localhost. I use localhost as my editing server for the mediawiki
> >>> installed there /var/www  directly into that directory. Any ideas what I
> >>> have screwed up with my system that will cause this. Also the server is
> >>> not delivering the actual website either.
> >>> thanks
> >>> john
> >>>
> >>>
> >>
> >> John,
> >>
> >> What's the exact message you get?
> >>
> >> Jerry
> >>
> > Well I have gotten past the message stage; Seems I needed to move all
> > the sites ( DWWW, GALLERY, Mediawiki, etc)  into separate directories
> > under /var/www and to revert Apache to /var/www as the root directory
> > for the server. I also changed the owner back to root & permissions to
> > 755 for /var/www. Currently I have localhost running and my IP DNS
> > server at godaddy sending everything to the correct IP address. I can
> > now run http://localhost/phpinfo.php  which gets the running php
> > configuration OK. Now the issue seems to be that some scripts ending
> > in .php are not being allowed to run (under google chrome) instead they
> > are being downloaded & the source code displayed as text. I recall this
> > was an issue in older versions of apache, but for the life of me I don't
> > recall being required to add any exceptions such as AddHandler, AddType,
> > etc. since debian enabled all this by default. However those seems to be
> > required so I'm investigating them now. I will graciously accept any
> > advice.
> > Thanks
> > John
> >
> > BTW: I was sufficiently warned by several list contributors about
> > lighttpd being a can of worms to configure, Just wanted to give it a go.
> >
> >
> 
> You don't need to have them all under /var/www, but you do need each 
> virtualhost to have its own directory.  I'm running several hosts; I 
> have several different virtualhost entries in my Apache configuration. 
> Each one has an entry in the /etc/hosts file.
> 
> For instance, if one of the sites I manage is example.com, I'll have an 
> entry in /etc/hosts like:
> 
>    127.0.0.1       example
> 
> And I'll have a virtualhost defined in Apache as
> 
> <VirtualHost 127.0.0.1:80>
>    ServerName example
>    DocumentRoot "/var/www/example/html"
> ...
> </VirtualHost>
> 
> Files go in /var/www/example/html
> 
> To do it the Debian way, I place the virtual host information in 
> /etc/apache2/sites-available/example, then place a symlink to it as 
> //etc/apache2/sites-enabled/###-example, where ### is a 3-digit number 
> (sites are loaded in directory name sort order).
> 
> That way if I want to remove an entry, just remove the symlink and 
> restart Apache.
> 
> As for your PHP problem - you don't have PHP installed as an Apache 
> module.  You need to get the package libapache2-mod-php5.
> 
> Jerry
Sorry to say but I actually do have libapache2-mod-php5 installed. I'm
now wondering if the ZendServer I installed, from their website, then
removed somehow rewrote some configs somewhere. It installed a crap load
of specialized php stuff, which I also removed.
John


Reply to: