FedoraThis forum is for the discussion of the Fedora Project.
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.
Hello everyone.. it's been 4 years since I had to reinstall my server (due to a hard drive crash not hackers) and it seems I am WAYYY behind in the learning curve for fedora. LOL.. I went from fedora 12 to 21, apache 1.8 to 2.4.10 and bind 7 to 9.9 in a single leap.. and what a leap...
I have read tons of docs and tutorals, lost a lot of hair and reached the brain freeze point... hahaha So I'm asking for help...
My problem is... only my default site is coming up in any browser. none of my other sites 2, 3 or 4 show up or can be pinged.
apachectl -S or httpd -S both work fine, correct results without any errors after I took NameVirtualHost out of the conf files
box is:
Fedora 21
Apache 2.4.10
BIND 9.9
/etc/httpd/conf.d/vhost.conf
Code:
<VirtualHost *>
ServerName dns2.boxname.com
</VirtualHost>
<VirtualHost *:80>
ServerName site1.com
ServerAlias www.site1.com
ServerAlias webmail.site1.com
ServerAlias admin.site1.com
DocumentRoot /home/csc/public_html
ErrorLog /var/log/virtualmin/site1.com_error_log
CustomLog /var/log/virtualmin/site1.com_access_log combined
ScriptAlias /cgi-bin/ /home/csc/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/csc/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php5.6 .php5.6
AddType application/x-httpd-php .php
</Directory>
<Directory /home/csc/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName site2.com
ServerAlias www.site2.com
ServerAlias webmail.site2.com
ServerAlias admin.site2.com
DocumentRoot /home/akahw/public_html
ErrorLog /var/log/virtualmin/site2.com_error_log
CustomLog /var/log/virtualmin/site2.com_access_log combined
ScriptAlias /cgi-bin/ /home/akahw/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/akahw/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php5.6 .php5.6
AddType application/x-httpd-php .php
</Directory>
<Directory /home/akahw/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName site3.com
ServerAlias www.site3.com
ServerAlias webmail.site3.com
ServerAlias admin.site3.com
DocumentRoot /home/tcc/public_html
ErrorLog /var/log/virtualmin/site3.com_error_log
CustomLog /var/log/virtualmin/site3.com_access_log combined
ScriptAlias /cgi-bin/ /home/tcc/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/tcc/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php5.6 .php5.6
AddType application/x-httpd-php .php
</Directory>
<Directory /home/tcc/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName site4.com
ServerAlias www.site4.com
ServerAlias webmail.site4.com
ServerAlias admin.site4.com
DocumentRoot /home/jmp/public_html
ErrorLog /var/log/virtualmin/site4.com_error_log
CustomLog /var/log/virtualmin/site4.com_access_log combined
ScriptAlias /cgi-bin/ /home/jmp/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/jmp/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php5.6 .php5.6
AddType application/x-httpd-php .php
</Directory>
<Directory /home/jmp/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
</VirtualHost>
last line in /etc/httpd/conf/httpd.conf
Code:
IncludeOptional conf.d/*.conf
and Listen 80 is uncommented
now I'm really becoming disillusioned with fedora, how sad.. after having fedora 12, hosting 14 websites both http and https, plus mail, running non-stop for 4 years with only a little maintenance (every 6 months or so) I meet fedora 21 and up..
We find new demons (ever wonder why they call services on Linux that??? LOL) mysql is now marianDB, there's a new firewalld thingy replacing iptables and Linux firewall, http.conf is now split-up into different conf files and all the good security tweaks I did to apache, SSH, ftp and mail on my fedora 12 box are now hidden or built into the demons so you can't change them (or I haven't figured out how yet)....
and to top it off NOWHERE can I find a step by step tutorial on how to setup a secure working LAMP for anything above fedora 18
I posted this on another fedora forum and Over 150 people have read this post but not one single person has made a suggestion or idea which leads me to believe we are all dazed and confused about the "New and Improved" Fedora. After using fedora for the past 15 years on my web servers, maybe it's time to say goodbye to and old love and move on, if no one can help educate an old man.
correction... I have the LAMP installed what I need is troubleshooting tips for fedora 21 as a web server... LOL
Well, when considering "how do I do everything?" type questions such as yours, I generally lose interest once the scope of a potentially useful answer becomes apparent - dunno about anyone else, but your response rate speaks for itself.
Do some research, maybe start at the "what's new" pages for each release you have missed, or strt fresh with the docs for the current versions you are running now, and ask some specific questions about stuff that doesn't require potential responders to start with "First, the universe cooled ..."
thanks for your reply descendant_command to start with "if a potentially useful answer was apparent" I wouldn't be here. I have done lots of research, read tons of what's new in apache 2.4 and bind 9.9 (that's how I discovered the new firewalld and iptables for v4 and v6).
I posted my vhost file and httpd config lines to see if someone could find something wrong with them.
my "response rate" is due to the fact I have 14 websites to get back up and running and to let people know what I have been trying so suggestions from someone are not duplicated.
Next.. I remember when "First, the universe cooled ..." I was there running my own dedicated server back in 1992. (before that it was gopher and bulletin boards with 300bps dialup modems (I think I paid $700 for it) which took 5 min to download a 50k file) LMAO
you want specific questions...
1. is there anything wrong with my vhost file?
2. what should the doc root "/home" permissions be set to?
3. should each website have it's own *.conf file?
4. where can I find examples of WORKING httpd.conf, vhost.conf and bind 9.9 .host files for fedora 21? (or can someone send me copies... there are LOTS of piecemill ones out there but can't find complete ones)
none of my replies are me being a smartas*... they are all in fun so PLEASE take them that way.. Life is way to short for confrontations...
none of my replies are me being a smartas*... they are all in fun so PLEASE take them that way..
Me too
Quote:
to start with "if a potentially useful answer was apparent" I wouldn't be here.
I was referring to the process of attempting to formulate a response to an unfocussed post.
Quote:
1. is there anything wrong with my vhost file?
Well, I'm not an expert, and I'm more familiar with the Debian implementation (which I think has some differences from "stock") and not sure what if anything might be handled differently under Fedora.
A couple of things (none of which should be showstoppers):
Your first vhost appears superfluous.
You're mixing 2.2 & 2.4 access control methods (Allow from / Require)
Quote:
2. what should the doc root "/home" permissions be set to?
Readable by your webserver user & writable by whoever needs to write to it (presumably your users).
Quote:
3. should each website have it's own *.conf file?
That's how Debian does it and I find it logical and easy to follow and administer. The "master" apache2.conf contains the default settings for the whole server and each vhost definition file sets the docroot and Servername and makes any required setting modifications for each site.
Quote:
4. where can I find examples of WORKING httpd.conf, vhost.conf and bind 9.9 .host files for fedora 21? (or can someone send me copies... there are LOTS of piecemill ones out there but can't find complete ones)
Well, they are usually pretty specific to each individual config.
My advice would be to wipe out what you have, start with a default install, and build it (again) step by step. It can be problematic trying to massage old configs to fit a new scheme.
Get the "it works" page going, then add a vhost pointing to your first site and get that sorted, then add more - testing and checking logs along the way.
OK everyone finally found the culprit that was keeping my server from resolving host names... it was the bind config file "named.conf" I had to comment out the listen port 53 line like so:
// listen-on port 53 { 127.0.0.1; };
after I did this EVERYTHING works great (http, https, ftp) by ip or domain name.. guess the listen option is NOW built into bind as a default and it didn't like seeing it twice...
I never thought I would live long enough to see Linux developers take away so many controls and try to make it like Windows, a PnP system,, how sad.
Now it's on to see what security controls they have taken away from us...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.