LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Closed Thread
  Search this Thread
Old 08-26-2020, 10:03 AM   #61
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled

The websites are going to be FREE and I will post the code! I’m doing this to see if I can do it. I will probably do it in PHP if I can.
 
Old 08-26-2020, 10:17 AM   #62
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Fred27377 View Post
The websites are going to be FREE and I will post the code! I’m doing this to see if I can do it. I will probably do it in PHP if I can.
You apparently cannot, since a ten-line perl script is beyond your skills. And posting code to a public website is a PHENOMENAL way to expose every single vulnerability it may have...so why on earth would anyone use it?

And you *STILL* don't have an idea of what this 'website' is going to do, who the target users are, or what web host you're going to use. And if these are public-facing, you will have to PAY (yes, PAY) for domain registration. Are you going to do that for 1,000 websites? Are you also going to implement SSL and other security measures? And saying "..do it in PHP" is as vague as everything else you've posted in most of your threads. PHP to do WHAT? It is a web-programming language...you have to again have a GOAL. What is it going to actually DO and what is it going to interface with??
 
1 members found this post helpful.
Old 08-26-2020, 11:30 AM   #63
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by Fred27377 View Post
The websites are going to be FREE and I will post the code! I’m doing this to see if I can do it. I will probably do it in PHP if I can.
Forgive me, but more I read this thread, more confusing it gets.
So far, I understand you want to setup 1000's of websites, and use Perl (or now PHP).
If this is accurate, great, if not, please correct me.

Now that you know what you want to do - What do you are you looking for HERE in this thread?

-----

Personally, I would start with ONE website then plan for thousands!
 
1 members found this post helpful.
Old 08-26-2020, 11:55 AM   #64
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,627

Rep: Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556Reputation: 2556
Quote:
Originally Posted by dc.901 View Post
What do you are you looking for HERE in this thread?
Maybe the OP is trying to race TB0ne to see who can get the most posts in this thread before the mods finally close it?

I'm not convinced they're looking for anything other than the reactions they're currently getting, but if not - if they are actually serious about building some infection tracking system - that's all the more reason to not try and help, because it's quite clear that any such system would be so poorly constructed so as to do more harm than good.

 
2 members found this post helpful.
Old 08-26-2020, 01:07 PM   #65
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by boughtonp View Post
Maybe the OP is trying to race TB0ne to see who can get the most posts in this thread before the mods finally close it?

I'm not convinced they're looking for anything other than the reactions they're currently getting, but if not - if they are actually serious about building some infection tracking system - that's all the more reason to not try and help, because it's quite clear that any such system would be so poorly constructed so as to do more harm than good.
I've asked the mods several times to close this quite-obvious troll/pointless post. Jefro's reply would seem to indicate there aren't any plans to.
 
1 members found this post helpful.
Old 08-27-2020, 03:36 PM   #66
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
What is a host header?

https://www.itprotoday.com/devops-an...at-host-header

https://developer.mozilla.org/en-US/...P/Headers/Host
 
1 members found this post helpful.
Old 08-28-2020, 10:26 AM   #67
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by scasey View Post
As others have stated, your goals at not clear. We can’t help you do what you want if you don’t clearly state what you want...
OP has admitted that much themselves:
Quote:
Originally Posted by Fred27377 View Post
I don’t know what I am trying to accomplish. I came up with an idea four or five days ago and posted my idea. I took until today for me to figure it out. I’ve always been like that running on intuition. Not smarts but a hunch. I guess my goal is to have a site with 1000 pages.
At least they've been fairly consistent about "1000 pages" though I'm quite sure it was 320 million at some point.
Where is the effort to even try to set up 1 website, and take it from there?
OP is clearly trolling us all, almost a textbook definition, and we're all nicely playing along...
 
1 members found this post helpful.
Old 08-28-2020, 04:15 PM   #68
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
I figured this out. It’s not a 1000 pages like I thought. It is on demand using $usename as the subdomain. You and I both could not have realized this from the beginning. Life is unpredictable and the one certainty is change.
 
Old 08-28-2020, 06:09 PM   #69
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by Fred27377 View Post
I figured this out. It’s not a 1000 pages like I thought. It is on demand using $usename as the subdomain. You and I both could not have realized this from the beginning. Life is unpredictable and the one certainty is change.
No one could 'realize' it, because you don't have a clue what you want to do.

Out of morbid curiosity, what do you plan on doing with the "$username", that magically solves your problems?
 
1 members found this post helpful.
Old 08-30-2020, 07:02 AM   #70
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
Here is the old script:

Code:
#!/bin/sh

PREF=$1
COUNT=$2

VirtualHost="*:80"
ServerAdmin="kudzu9999@icloud"
DocumentRoot="opt/htdocs"
ErrorLog="logs"
CustomLog="logs"

if [[ "$PREF" == "" ]]; then
	echo "empty file prefix!"
	exit 0
fi

if [[ "$COUNT" == "" ]]; then
	echo "max count not specified!"
	exit 0
fi

# make log directories
mkdir -p $ErrorLog
mkdir -p $CustomLog

# add permissions
chmod 777 $ErrorLog
chmod 777 $CustomLog

for i in $(seq 1 $COUNT)
do
	echo "${PREF}.${i}.com"

	# create config file
	conf="${PREF}.${i}.conf"
	echo -n "" > $conf

	# populate config file
	echo "<VirtualHost ${VirtualHost}>" >> $conf
	echo "    ServerAdmin ${ServerAdmin}" >> $conf
	echo "    DocumentRoot \"${DocumentRoot}/${PREF}.${i}\"" >> $conf
	echo "    ServerName ${PREF}.${i}.com" >> $conf
	echo "    ErrorLog  \"${ErrorLog}/${PREF}.${i}.com-error_log\"" >> $conf
	echo "    CustomLog  \"${CustomLog}/${PREF}.${i}.com-access_log common\"" >> $conf
	echo "</VirtualHost>" >> $conf

	# create directories
	mkdir -p "${DocumentRoot}/${PREF}.${i}"

	# add permissions
	chmod 777 "${DocumentRoot}/${PREF}.${i}"

done

exit 0
 
Old 08-30-2020, 08:03 AM   #71
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Never use chmod 777

Moderators, please lock this thread, this is going nowhere.
 
2 members found this post helpful.
Old 08-30-2020, 09:48 AM   #72
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by ondoho View Post
Never use chmod 777
Moderators, please lock this thread, this is going nowhere.
Good luck; I reported the OP numerous times; post #55 answers that. The "Question Guidelines"/Welcome FAQ seem to be pretty clear.
 
1 members found this post helpful.
Old 08-31-2020, 02:51 PM   #73
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Asked to close thread.
People keep posting.
What do you want?
 
1 members found this post helpful.
Old 08-31-2020, 02:57 PM   #74
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,753

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Quote:
Originally Posted by jefro View Post
Asked to close thread.
People keep posting.
What do you want?
The closure requests would indicate we'd like the thread closed. And people can only post because the thread IS NOT closed.

Last edited by TB0ne; 08-31-2020 at 03:04 PM.
 
1 members found this post helpful.
Old 09-01-2020, 09:26 AM   #75
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
The BASH script is not right. It does not edit httpd.conf file as required. Any suggestions?
 
  


Closed Thread



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
redirect non www site to www site with 301 status mitter1989 Linux - Server 1 08-02-2014 07:53 AM
How to capture web site incoming traffic and redirect to different IP/server superkikim Linux - Server 5 11-08-2012 11:04 AM
call perl script through another perl script with arguments nanda22 Linux - Newbie 21 07-21-2009 12:18 AM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM

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

All times are GMT -5. The time now is 07:09 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