Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

failed to open stream: Permission denied in /etc/httpd/

Posted on 2015-02-08
6
Medium Priority
?
163 Views
Last Modified: 2015-02-13
I have a centos linux server apache1
Right now my server is set up to use var/www/html  where my 1 website has been serving from and runs fine.
I have another site I need to add so I decided to change the httpd file to use virtual host names.
Now the home firectory for the site is etc/httpd/domainname

I uploaded site to this folder in /etc/httpd/domainname and get this error when trung to open page.
failed to open stream: Permission denied in /etc/httpd/domainname.

Not sure what to do I set the directory to 0777 in attempt to overcome permissions.
the group is root on the folder and permissions is 0777.


Thanks,
0
Comment
Question by:leadcodev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 79

Assisted Solution

by:arnold
arnold earned 2000 total points
ID: 40597633
You likely have Selinux running.

It is not advisable to use the site in /etc/ as there other restriction.
Ls -lZ

You should use /var/www/domainname

/etc/httpd/conf.d/domainname.conf that will set the documentroot and other parameters.

This will also handle updating the site.
0
 

Author Comment

by:leadcodev
ID: 40597649
Ok  here is what I have in conf.d

[root@D19019 conf.d]# ls
php.conf  proxy_ajp.conf  README  welcome.conf


Can you be more specific on how to do what your saying please.
0
 

Author Comment

by:leadcodev
ID: 40597652
This is in my httpd file

<VirtualHost *:80>
ServerName support.domain.com
ServerAlias *.support.domain.com
DocumentRoot support.domain.com_folder
</VirtualHost>
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

Assisted Solution

by:leadcodev
leadcodev earned 0 total points
ID: 40597673
<VirtualHost *:80>
  ServerName example.org
  ServerAlias *.example.org
  ServerAdmin webmaster@example.org
  ErrorLog /var/log/httpd/example.err
  CustomLog /var/log/httpd/example.log combined
  DocumentRoot /var/www/example.org
  <Directory "/var/www/example.org">
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>
0
 

Accepted Solution

by:
leadcodev earned 0 total points
ID: 40597674
Ok for anyone else with this problem add the above config into (domain).conf under conf.d/
0
 

Author Closing Comment

by:leadcodev
ID: 40607545
Expert answer was vague.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question