Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
is the folder " /var/drupal" owned by "apache" like /var/www is
I did a chown on it like this
Code:
chown -R apache:apache /var/drupal
Quote:
Originally Posted by TommyC7
Alongside what else has been said, you haven't told us how you turned off SELinux (I recommend keeping it on by the way except for debugging purposes).
If you used:
Code:
setenforce 0
That's not going to survive a reboot.
Also, there's no need to reboot the entire machine if all you're going to do is restart a service or just change the permissions of a directory.
For future reference, use
Code:
sestatus
To see if SELinux is set to enforcing/permissive/disabled.
I diabled SELinux by editing a line in the /etc/selinux/config file
Code:
SELINUX=enforcing
was changed to
Code:
SELINUX=disabled
In the lab I work in they always turn off selinux before doing anything with a red hat machine. So I want to keep selinux off seeing that it's the root to a lot of problems and has been in the past. I just want it to be off. As for the directory piece. I'll try it and see what happens, when I do I'll get back to you
Last edited by baronobeefdip; 06-11-2013 at 09:00 PM.
So I want to keep selinux off seeing that it's the root to a lot of problems
you really want it set to " permissive " while you are working on it
that way any issues that crop up will be in the se log and "audit2alow " will be able to wright a custom rule ( if needed)
and setroubleshooter will give you and instant notification if there was to be any issues .
set the directory entry in the httpd.conf
SEE: post #13
<VirtualHost *:80>
ServerName drupal.baronobeefdip.josh
DocumentRoot /var/drupal/html
<Directory /var/drupal/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName joomla.baronobeefdip.josh
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
It works, The site at the top is the default (when I request it through IP address.) and the one at the bottom is the one that is virtual and must be requested with a name. Thanks for your help, it works now.
Last edited by baronobeefdip; 06-11-2013 at 09:30 PM.
<VirtualHost *:80>
ServerName joomla.baronobeefdip.josh
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName drupal.baronobeefdip.josh
DocumentRoot /var/drupal/html
<Directory /var/drupal/html>
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName drupal.baronobeefdip.josh
DocumentRoot /var/drupal/html
<Directory /var/drupal/html>
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/localhost.crt
SSLCertificateKeyFile /etc/httpd/ssl/localhost.key
</VirtualHost>
I can request the hosts joomla.baronobeefdip.josh and drupal.baronobeefdip.josh. I execute the rewrite module like you see here so when I request the drupal host I will be redirected to the other drupal site which deploys ssl on port 443. But what is happening now is that whenever I request the drupal host I get redirected to the joomla one but with an SSL connection. Why is it doing this? I thought virtual host rewrites were relatable with names, so that whenever I do a port 80 request to drupal it will redirect me to the 443 host that uses the drupal directory because it was named drupal. This is more confusing than the last predicament because I now have absolutely no idea what is happening here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.