LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-09-2021, 08:04 AM   #61
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Errors after corrections!


All,

OK! Made all the corrections and even commented out all the old code and yet still have the exact same errors, so now I'm suspecting and investigating whether it is the TBNK-SVR.com.conf file, as that logically, at least in my mind, could be the only place/thing still always pointing to this specific error.

Man, why can't the Apache developers actually write their code to point to actual errors and the exact location of where the error comes from.

Cheers!

TBNK

Last edited by TBotNik; 05-09-2021 at 08:06 AM.
 
Old 05-09-2021, 08:15 AM   #62
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
Apache is not prevaricating, I suspect the error is actually the closing virtual host tag. That is not valid within <Directory ...> context so that is where the error is reported:

Code:
<VirtualHost 'Webs-R-Us.com':80>
    ServerAdmin 'webmaster@Webs-R-Us.com'
    DocumentRoot '/3T/Syncs/Webs-R-Us/'
    <Directory '/3T/Syncs/Webs-R-Us/'>
    ServerName 'www.Webs-R-Us.com'
    ServerAlias 'Webs-R-Us.com'
</VirtualHost>
Also, I suspect this is not what you intended...

Code:
<VirtualHost TBotNik,com:80>
Read the error messages and try to understand what they are telling you, and read your own configs with a more critical eye rather than jump to the conclusion that the application is telling lies.
astrogeek,

Originally wrote it without any quotes. Tried both single and doube quotes and all combinations thereof. Have tried quoting line by line, but always the exact same errors!

Per my previous post now looking to see if I can find errors in the TBNK-SVR.com.conf file as seems to be the only logical common denominator.

Cheers!

TBNK

Last edited by TBotNik; 05-09-2021 at 08:20 AM.
 
Old 05-09-2021, 10:56 AM   #63
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
Quote:
Originally Posted by TBotNik View Post
OK! Made all the corrections and even commented out all the old code and yet still have the exact same errors...
That is just meaningless concatenated words.

What corrections? What errors?

Quote:
Originally Posted by TBotNik View Post
Man, why can't the Apache developers actually write their code to point to actual errors and the exact location of where the error comes from.
They do, and it does. You appear to have made no effort to understand what is causing the error.

Quote:
Originally Posted by TBotNik View Post
Originally wrote it without any quotes. Tried both single and doube quotes and all combinations thereof. Have tried quoting line by line, but always the exact same errors!
Please read my previous post, look at your actual code character by character and tag by tag, and think about what you see and what I actually said. I did not mention "quotes".

Troubleshooting is about understanding what is happening and then making changes based on that understanding. We are trying to lead you into understanding your problem.

Please try to understand why this one specific error is happening in this one specific place so you can fix it. If you are not willing to make that effort you are wasting your own time and that of those trying to help.

Last edited by astrogeek; 05-09-2021 at 11:19 AM.
 
Old 05-14-2021, 11:25 AM   #64
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Finally

All,

My Tue 11 May '21 11:30 post on Apache Lounge at:

https://www.apachelounge.com/viewtop...666&highlight=

Was answered by James Blond as being correct, so now implementing that fix/logic!

Should have it running today, so then back on the fast Kubuntu 18.04 LTS server, instead of the very slow Dell 790 SFF Desktop machine with Kubuntu 14.04 LTS.

Keep the 790 with 14.04 as 14.04 is the actual last stable Kubuntu/Ubuntu release! Just need a faster CPU and transfer all HD's to it, so I have the speed.

Cheers!

TBNK
 
Old 05-14-2021, 11:55 AM   #65
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
Quote:
Originally Posted by TBotNik View Post
All,

My Tue 11 May '21 11:30 post on Apache Lounge at:

https://www.apachelounge.com/viewtop...666&highlight=

Was answered by James Blond as being correct, so now implementing that fix/logic!

Should have it running today, so then back on the fast Kubuntu 18.04 LTS server, instead of the very slow Dell 790 SFF Desktop machine with Kubuntu 14.04 LTS.

Keep the 790 with 14.04 as 14.04 is the actual last stable Kubuntu/Ubuntu release! Just need a faster CPU and transfer all HD's to it, so I have the speed.

Cheers!

TBNK
Once again you have totally ignored the advice given, failed to interact in any meaningful way with those offering help, myself included, and have now deflected the thread in an effectively new random direction based on mis-characterization of replies you have received at another online forum.

Please end this behavior which only wastes the time of those offering help.

Please see the LQ FAQ:

Quote:
If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere. We truly hope that isn't necessary, and assure you Linux and Open Source are extremely rewarding and well worth the learning curve in the long run.
 
1 members found this post helpful.
Old 05-18-2021, 01:49 PM   #66
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Progress

All,

Well I've made some progress but not there yet.

Here is my _default_.conf file:

Code:
<VirtualHost localhost:80>
    ServerAdmin webmaster@localhost
    ServerName localhost
    ServerAlias localhost
    DocumentRoot /var/www/
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
</VirtualHost>
Localhost now comes up and shows the correct directory, but will not allow any of the subdirectories to open. Guessing it is the "AllowOverride None" line effecting that.

The other vhosts do not come up, but the Apache error log, which was blank before is now 54 pages of errors and have not figured out what any of those are yet.

Cheers!

TBNK
 
Old 05-19-2021, 01:12 AM   #67
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Localhost now comes up and shows the correct directory, but will not allow any of the subdirectories to open. Guessing it is the "AllowOverride None" line effecting that.
Please define what you mean by "not allow any of the subdirectories to open"
FYI "AllowOverride None" means that apache will not follow any directive inside a .htaccess file


Quote:
The other vhosts do not come up, but the Apache error log, which was blank before is now 54 pages of errors and have not figured out what any of those are yet.
You should post here the recent errors if you want us to help you
In Ununtu, run the following command to see the vhosts configured:
Code:
apache2ctl -S
 
Old 05-31-2021, 07:01 AM   #68
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
???

All,

So let me write out my understanding to this sheer craziness of what Apache is
clueless about. According to the Apache docs, I can define/configure Apache one
of two ways! Since the apache2.conf last 2 line read:

Code:
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
Apache will read all .conf files in the /etc/apache2/sites-enabled/ directory
but the actual files exist and are edited in the /etc/apache2/sites-available/
directory then symlinked to the site-enabled directory via the cmd

"ln -s <available-file> <enabled-file>

so I have the following <available files>

1.) _default_conf
2,) projects.conf (or projects.com.conf),
3.) seopanel.conf (from seopanel install),
4.) TBNK-SVR.conf (or TBNK-SVR.com.conf),
5.) TBotNik.conf (or TBotNik.com.conf),
6.) Webs-R-Us.conf (or Webs-R-Us.com.conf)

Notice I have tried with both the .com and without. Also notice that the
phpmyadmin is not in the list as it exists at:

/etc/apache2/conf-available/
/etc/apache2/conf-enabled/

With the second location via symlink. And I have executed the "ln -s" on all
the /sites-available/ file so their symlinks exist in /sites-enabled/ also.

The other method, again according to the Apache docs, is to define all the
vhosts in only the _default_.conf file, so I have been fighting this soooo long
that I created a directory "/Configs/Apache" for storing and editing the files
so I can implement either way using a BASH script to move things around. So
here are my files:

Single-File Implementation:
_default_.conf
Code:
# Single File VHost Config

#Default
<VirtualHost _default_:80>
	ServerAdmin webmaster@localhost
	ServerName localhost
	ServerAlias localhost
	DocumentRoot /var/www/
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
	</Directory>
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

#Projects
<VirtualHost projects.com:80>
	ServerAdmin admin@projects.com
	ServerName www.projects.com
	ServerAlias projects.com
	DocumentRoot /3T/Syncs/Projects/
	<Directory /3T/Syncs/Projects/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
	</Directory>
	ErrorLog ${APACHE_LOG_DIR}/prj_error.log
	CustomLog ${APACHE_LOG_DIR}/prj_access.log combined
</VirtualHost>

#SeoPanel
<VirtualHost seoloical:80>
     ServerAdmin admin@seolocal.com
     DocumentRoot /var/www/html/seopanel
     ServerName www.seolocal.com
     ServerAlias seolocal.com
     <Directory /var/www/html/seopanel/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>
     ErrorLog ${APACHE_LOG_DIR}/seop_error.log
     CustomLog ${APACHE_LOG_DIR}/seop_access.log combined
</VirtualHost>

#TBNK-SVR
<VirtualHost TBNK-SVR.com:80>
    ServerName www.tbnk-svr.com
    ServerAlias tbnk-svr.com
    ServerAdmin admin@tbnk-svr.com
    DocumentRoot /3T/Syncs/
    <Directory /3T/Syncs>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbs_error.log
     CustomLog ${APACHE_LOG_DIR}/tbs_access.log combined
</VirtualHost>

#TBotNik
<VirtualHost TBotNik.com:80>
    ServerName www.TBotNik.com
    ServerAlias tbotnik.com
    ServerAdmin admin@tbotnik.com
    DocumentRoot "/3T/Syncs/.../TBotNik/"
    <Directory "/3T/Syncs/.../TBotNik/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbk_error.log
     CustomLog ${APACHE_LOG_DIR}/tbk_access.log combined
</VirtualHost>

#Webs-R-Us
<VirtualHost webs-r-us:80>
    ServerAdmin admin@webs-r-us.com
    ServerName www.webs-r-us.com
    ServerAlias webs-r-us.com
    DocumentRoot "/3T/Syncs/.../Webs-R-Us/"
    <Directory "/3T/Syncs/.../Webs-R-Us/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/wru_error.log
     CustomLog ${APACHE_LOG_DIR}/wru_access.log combined
</VirtualHost>
Multi-File Implementation:
_default_.conf
Code:
<VirtualHost _default_:80>
    ServerAdmin webmaster@localhost
    ServerName localhost
    ServerAlias localhost
    DocumentRoot /var/www/
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
</VirtualHost>
projects.conf (also projects.com.conf)
Code:
<VirtualHost projects:80>
    ServerAdmin admin@projects.com
    ServerName www.projects
    ServerAlias projects
    DocumentRoot /3T/Syncs/Projects/
    <Directory /3T/Syncs/Projects/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
    </Directory>
</VirtualHost>

<VirtualHost projects.com:80>
    ServerAdmin admin@projects.com
    ServerName www.projects.com
    ServerAlias projects.com
    DocumentRoot /3T/Syncs/Projects/
    <Directory /3T/Syncs/Projects/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
    </Directory>
</VirtualHost>
seopanel.conf (From install so not changed)
Code:
<VirtualHost seolocal:80>
     ServerAdmin admin@seolocal.com
     DocumentRoot /var/www/html/seopanel
     ServerName www.seolocal.com
     ServerAlias seolocal.com
     <Directory /var/www/html/seopanel/>
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>
     ErrorLog ${APACHE_LOG_DIR}/seop_error.log
     CustomLog ${APACHE_LOG_DIR}/seop_access.log combined
</VirtualHost>
TBNK-SVR.conf (also TBNK-SVR.com.conf)
Code:
<VirtualHost TBNK-SVR:80>
    ServerName www.tbnk-svr
    ServerAlias tbnk-svr
    ServerAdmin admin@tbnk-svr
    DocumentRoot /3T/Syncs/
    <Directory /3T/Syncs>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbs_error.log
     CustomLog ${APACHE_LOG_DIR}/tbs_access.log combined
</VirtualHost>

<VirtualHost TBNK-SVR.com:80>
    ServerName www.tbnk-svr.com
    ServerAlias tbnk-svr.com
    ServerAdmin admin@tbnk-svr.com
    DocumentRoot /3T/Syncs/
    <Directory /3T/Syncs>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbs_error.log
     CustomLog ${APACHE_LOG_DIR}/tbs_access.log combined
</VirtualHost>
TBotNik.conf (also TBotNik.com.conf)
Code:
<VirtualHost TBotNik.com:80>
    ServerName www.TBotNik.com
    ServerAlias tbotnik.com
    ServerAdmin admin@tbotnik.com
    DocumentRoot "/3T/Syncs/.../tbotnik/"
    <Directory "/3T/Syncs/.../tbotnik/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbk_error.log
     CustomLog ${APACHE_LOG_DIR}/tbk_access.log combined
</VirtualHost>

<VirtualHost TBotNik.com:80>
    ServerName www.TBotNik.com
    ServerAlias tbotnik.com
    ServerAdmin admin@tbotnik.com
    DocumentRoot "/3T/Syncs/.../tbotnik/"
    <Directory "/3T/Syncs/.../tbotnik/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/tbk_error.log
     CustomLog ${APACHE_LOG_DIR}/tbk_access.log combined
</VirtualHost>
Webs-R-Us.conf (also Webs-R-Us.com.conf)
Code:
<VirtualHost webs-r-us:80>
    ServerAdmin admin@webs-r-us.com
    ServerName www.webs-r-us
    ServerAlias webs-r-us
    DocumentRoot "/3T/Syncs/.../Webs-R-Us/"
    <Directory "/3T/Syncs/.../Webs-R-Us/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/wru_error.log
     CustomLog ${APACHE_LOG_DIR}/wru_access.log combined
</VirtualHost>

<VirtualHost webs-r-us.com:80>
    ServerAdmin admin@webs-r-us.com
    ServerName www.webs-r-us.com
    ServerAlias webs-r-us.com
    DocumentRoot "/3T/Syncs/.../Webs-R-Us/"
    <Directory "/3T/Syncs/.../Webs-R-Us/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
    </Directory>
     ErrorLog ${APACHE_LOG_DIR}/wru_error.log
     CustomLog ${APACHE_LOG_DIR}/wru_access.log combined
</VirtualHost>
Notice I changed the error log name for each so I can isolate any real
problems by the VHost.

Then I wrote this BASH script to automate the process:

Code:
#! /bin/bash
# Sciprt for setting Apache Configs
# Must run in the SUDO Mode
# CMD: bash "/3T/Scripts/Extras/set-apache.sh" [option: single, multi]

opt=$1
aav_dir="/etc/apache2/sites-available"
aen_dir="/etc/apache2/sites-enabled"
cfg_dir="/Configs/Apache"
clear
if [ -z $1 ]; then 
   echo "No option set!"
   exit
fi

# Declare the functions first to load for execution!
function rm_cfg ( ) {
   for file in `ls $1`; do
		lfiv=${file: -5}
		lfor=${file: -4}
		if [ $lfiv = ".conf" ] || [ $lfor = ".swp" ]; then
			if [  $lfor = ".swp" ]; then
				nfil=".$1$file"
			else
				nfil="$1$file"
			fi
			rm -f $nfil
		fi
	done 
}	# end function rm_cfg
        
function cp_cfg ( ) {
	for file in `ls $1`; do
		subs=${file:0:2}
		tail=${file:2}
		if [ ${subs} = "m_" ]; then
			cp "$1$file" "$2$tail"
		   ln -s "$2$tail" "$3$tail"
		fi
	done 
}	# end function cp_cfg
        
echo "Remove all files in $aav_dir and $aen_dir"
rm_cfg "$aen_dir/"
rm_cfg "$aav_dir/"
if [ $opt == 'single' ]; then
   echo "Option is single!"
   cp "$cfg_dir/s_default_.conf" "$aav_dir/_default_.conf"
   ln -s "$aav_dir/_default_.conf" "$aen_dir/_default_.conf"
else
   echo "Option is multi!"
   cp_cfg "$cfg_dir/" "$aav_dir/" "$aen_dir/"
fi
#ls -al "$aav_dir"
#ls -al "$aen_dir"
echo "Restart Apache!"
bash "/3T/Scripts/Extras/ap-er-grab.sh"
Which calls this apache restart and msg trapping script:

Code:
#! /bin/bash
# Sciprt for dianosis of Apache Errors
# CMD: bash "/3T/Scripts/Extras/ap-er-grab.sh"

clear

echo "Clear the target file!"
rm -f "/3T/Syncs/Files/aper-grab.txt"
touch "/3T/Syncs/Files/aper-grab.txt"

echo "Restart Apache!"
echo "Restart Apache2" > /3T/Syncs/Files/aper-grab.txt
service apache2 restart >> /3T/Syncs/Files/aper-grab.txt

echo "Read System Errors!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read System Errors!" >> /3T/Syncs/Files/aper-grab.txt
echo "Run systemctl status 4 Apache2" >> /3T/Syncs/Files/aper-grab.txt
systemctl status apache2.service >> /3T/Syncs/Files/aper-grab.txt

echo "Read Journal Errors!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read Journal Errors!" >> /3T/Syncs/Files/aper-grab.txt
echo "Run journalctl 4 Apache2" >> /3T/Syncs/Files/aper-grab.txt
journalctl -xe >> /3T/Syncs/Files/aper-grab.txt

echo "Read Default Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read Default Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Read Projects Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read Projects Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/prj_error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Read SeoPanel Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read SeoPanel Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/seop_error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Read TBNK-SVR Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read TBNK-SVR Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/tbs_error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Read TBotNik Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read TBotNik Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/tbk_error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Read Webs-R-Us Error log 1st 20 lines!"
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo " " >> /3T/Syncs/Files/aper-grab.txt
echo "Read Webs-R-Us Errors!" >> /3T/Syncs/Files/aper-grab.txt
head -20 /var/log/apache2/wru_error.log >> /3T/Syncs/Files/aper-grab.txt

echo "Edit the output file!"
nano /3T/Syncs/Files/aper-grab.txt
So I have deployed the script with both the "single" and "multi" options.
Apache restarts, there are no errors, but nothing at all works. That includes
PHP from the cmd line.

Sorry I'm clueless, so help needed!
 
Old 05-31-2021, 12:23 PM   #69
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Let me get this straight.
You are trying to set up several virtual hosts.
You are trying to do this as a blanket attack on the problem and don't know what is going wrong.

Since this is a blanket approach any one item could be at fault and NONE will work until ALL are 100% correct.

The more reasonable approach is.
1. Get the local (actual) site working properly and 100%.
2. Configure one of the virtual hosts and get it working 100%
3. One at a time configure each of the remaining virtual sites and confirm each before moving to the next.

Trying to do multiple sites at once spreads your attention and adds to the frustration. Doing one at a time helps you find out what works, then repeat it on the next one. The first functioning one then becomes a template for configuring the next.

Use separate config files so a change in one does not break another. That is the purpose of using the include directive at the end of the main config file. It allows for multiple unnamed files to be included when the server is started/restarted.

Remember that a change in a config file or adding a new one REQUIRES a restart of the apache server before the change takes effect.

Last edited by computersavvy; 05-31-2021 at 12:29 PM.
 
1 members found this post helpful.
Old 06-01-2021, 07:42 AM   #70
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Apache restarts, there are no errors, but nothing at all works. That includes
PHP from the cmd line.
For php to work from cli, I guess you need to install php-cli package.

Re. apache, once again define what means "nothing at all works".
In the meantime stop using hostnames in the vhosts <VirtualHost ...> opening tag. Except from the default one, you should use for the rest of them something like:
Code:
#Projects
<VirtualHost *:80>
	ServerAdmin admin@projects.com
	ServerName www.projects.com
	ServerAlias projects.com
<-snip->
</VirtualHost>

#SeoPanel
<VirtualHost *:80>
     ServerAdmin admin@seolocal.com
     DocumentRoot /var/www/html/seopanel
     ServerName www.seolocal.com
<-snip->
</VirtualHost>
If you want to see what vhosts are enabled in your apache, you should run:
Code:
apache2ctl -S
 
  


Reply

Tags
aliases, apache, configuration



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script to display alias commands and un-alias any less than 12 characters bani Linux - Newbie 5 01-19-2014 12:34 PM
LXer: alias.sh puts your Linux shell alias on the clouds LXer Syndicated Linux News 0 01-21-2013 12:00 AM
Wildcard email alias in /etc/alias file custangro Linux - Enterprise 1 10-02-2009 12:17 PM
IP alias? Machine name alias? JohnLocke Linux - Newbie 4 01-16-2008 12:21 PM
Alias question (2 commands for one alias) gflores Linux - Newbie 3 01-21-2006 12:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration