Author Topic: Web server problem  (Read 4671 times)

vmajor

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Web server problem
« on: October 12, 2011, 06:47:28 am »
Hi,

I am using Zentyal to set up an ownCloud service to allow file upload to our server, and whatever else comes to mind later.

I created a Virtual host through Zentyal and got a /srv/www/owncloud directory into which I copied the ownCloud 2 (just released) archive and unpacked its contents.

However.

The apache2 document root is still pointing to /var/www thus Zentyal's Virtual host setup is not working. Apache2 was of course restarted.

I can fix this manually by editing .config files, but I am not sure I want to do this since I am certain that this will break something in the future, besides this defeats the purpose of using Zentyal to set up and manage web servers.

So, help. Please advise a correct way to get this to work, or tell me where I made a mistake and what to do instead.

Cheers,

V.


jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Web server problem
« Reply #1 on: October 19, 2011, 11:00:00 pm »
If you don't create any vhost, DocumentRoot is /var/www, for any vhost you create is /srv/www/domain.tld/. For custom Apache config on vhost level use /etc/apache2/sites-enabled/ebox-user-domain.tld/*.conf files.

-pekr-

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: Web server problem
« Reply #2 on: November 28, 2011, 12:00:08 am »
Hmm, so I created my domian config file, where I put one line:

DocumentRoot /home/www-mydomain

It seems to point to that directory, but although I put single index.html in there, it is not displayed, and I get error 403. In the corresponding domain error log I can see something like:

[Sun Nov 27 23:50:05 2011] [crit] [client 10.1.1.254] (13)Permission denied: /home/www-my-domain/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Is it this critical error because of what my website is not visible? Or is it because some incorrect access rights to my index.html, or incorrect form of my config?

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Web server problem
« Reply #3 on: November 29, 2011, 05:50:09 am »
If you change DocumentRoot option, you need to update AllowOverride setting to that path too.

-pekr-

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: Web server problem
« Reply #4 on: November 29, 2011, 06:58:25 am »
I am definitely not an Apache guru, but - why should I? In all past set-ups, no such thing was ever needed for a virtual host. I don't want to use .htaccess to allow user to override anything, so server should not be looking for one. This is a bug imo.

Can you provide me please with very simple config, when I can map virtual host to an FTP user home directory, e.g. /home/my-web?

-pekr-

  • Zen Monk
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Re: Web server problem
« Reply #5 on: November 29, 2011, 04:09:33 pm »
The problem was caused by incorrect filesystem permissions to particular /home/user dir. I changed it to 755, which is needed by apache, hopefully I am not creating any security issue here ....

mikeknight

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Web server problem
« Reply #6 on: May 23, 2012, 10:58:08 am »
Hi
Did you get LDAP working ?

zephyrnet

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +1/-2
    • View Profile
Re: Web server problem
« Reply #7 on: August 20, 2012, 11:03:04 pm »
HI

did you get any further with this?

Ive raised this post here :http://forum.zentyal.org/index.php/topic,11725.new.html#new

ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Web server problem
« Reply #8 on: August 21, 2012, 07:22:12 am »
pephyrnet,

this is a free community support based forum,   the basic idea is that.
A :    YOU put in the effort to solve your problems,  by investigating what could be wrong with your setup, and after clearly explaining us what did go wrong maybe get help fixing it...
B:    you DONT go spamming arround  your topic, to every corner in the forum, so what we may help you quicker,  you really cant,  and shouldn't  try to irritate us into helping you.. its rude and on this forum it will never work.

ive noticed you spamming your 'feature request in at least 3 other topics'  while in fact most of your question is already part of the documentation,  and or  thoroughly discussed in this forum.  (just search for apache  in this forum).

from all of this,  i can only say that you allready anoyed at least one (namely me) potentiall problem solver for your case... so i suggest you 4 options.
1:  put your effort where your mouth is and go get some books about linux, use google  and only when your really stuck  come ask for help ...
2: hire a professionall,  (if you dont want to pay in effort pay in cash, it works too, but isn't as mutch fun as doing it yourself).
3: patiently wait for someone to fix your problem for free,  (mind you that you really must be nice to a lot of people, or put in a lot of effort to expain why your idea is so great and why we should help you for free... 
4:  for get about the whole thing...


All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

zephyrnet

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +1/-2
    • View Profile
Re: Web server problem
« Reply #9 on: August 21, 2012, 09:17:41 am »
Hi ichat,

Thankyou for such a swift response, although not the one I was expecting.

Im sorry If Ive upset you, it certainly wasnt my intention. Did you actually read my main post in feature request?

Im not sure how you feel it was an attempt to "irritate us into helping you" let me explain my thought process, and perhaps you will see my intentions were genuine.

1) I searched for OWNCLOUD on the forum - I could see a few mentions of it, but no reported successes.

2) I thought it would be a good feature, so I posted the request in the New Feature Request part of the forum. - If you read it, you will see I explain my request & its merits but also go on to acknowlege others work, and question  if anyone else has actually had any success they can share with the community not yet posted about.

3) As there were already 3 partial posts on OWNCLOUD, I wanted to bring all those working on it already together. It could save lots of time, and it might have already been solved.
Perhaps it would have been better to PM them?
I thought the quickest way was to point them in the direction of my post and bring like minded people together.

Sorry I reallly do not think I have spammed anyone. SPAM to me would be posting links to my topic in many random irrelevant places. 
What I did was "direct mail" targeted at 3 posts with OWNCLOUD mentioned in them.  (for me this about OWNCLOUD not Apache) SO it was only posted in three additional topics - to the people I was looking for, who were already tinkering. Highlighting them to the feature request, bringing the few threads together, otherwise how would they know, until they physically looked?  If you search for Apache thousands of posts come up, but search for OWNCLOUD and only 3 come up.  And for me, this has begun not about Apache but about OWNCLOUD & Zentyal, forgive my ignorance here.

Im not a Zentyal Guru, so hence my asking questions, that to me at least, seemed the most relevant direct way.  My ignorance is simply lack of knowlege/experience in this area.

By posting in feature request, was the start of me putting my "effort where my mouth is"  Zentyal isnt plain old Ubuntu server, that is documented already. Hence my asking the community  specifially about Zentyal & Owncloud combined. Since Zentyal has its own framework.  I had already started my research, or I would not have known to post links in those three topics that already mention OWNCLOUD.

Im sorry if I have unknowingly broken any rules.  If there is a better way to have gone about things, Im willling to listen.

I hope the above explains my thought process well enough you can see I wasnt trying to wind anyone up, just seek collate information in the quickest fashion.

Please know, I truly didnt think It would upset folk by highlighting others to my making OWNCLOUD a feature request of Zentyal.   If people come back to me, I'll only be too happy to collate all the data with my own experience (which is currently little)  and build it into a tutorial with screen shots for others to use.




ichat

  • Zen Hero
  • *****
  • Posts: 795
  • Karma: +28/-16
  • RTFM!
    • View Profile
Re: Web server problem
« Reply #10 on: August 21, 2012, 01:55:13 pm »
just to give you a heads up,

ownlcoud is based on apache php5 and mysql,    you can also look for these keywords in the forum wiki and google.
also there are nice totorials about other  lamp5 aplications like  joomla, wordpress and others,

in fact there is quite a lot of information flying arround on these forums.   and you really should broaden your search paterns before asking...

All tips hints and advices are based on my personal experience.
As I try my best to be as accurate as possible, following my advice is always at your own risk,
I claim absolutely NO responsibility in any way!

truk104

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Web server problem
« Reply #11 on: January 17, 2013, 08:49:13 pm »
The only way I've solved this same problem was to create an .htaccess (in my case in the root doc directory of the virtual web server) and chmod 755 .htaccess. I put one directive in the .htaccess of Options +Indexes just for good measure.

Now the problem is that new files created in that doc root directory need to have permissions changed. I think this is a umask problem.

However there are many other problems with Zentyal Server Community edition that make setting up even basic client/server scenarios confusing and time consuming. I wonder if the supported version suffers the same issues or if they are resolved in that version?

truk104

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Web server problem
« Reply #12 on: January 23, 2013, 02:48:32 pm »
Or perhaps this is the way it's supposed to be...very high security. So high that Zentyal server must be configured, by hand at the console, for each user individually so the files they create in a Samba share are r dable and x able by the web daemon.

And then whenever a new module comes out that overwrites the config file you have manually edited, you will need to do it all over again.

If that's the way it's supposed to be, fine. But I still think IMHO that could be a checkbox in the Zentyal front end.