LinuxQuestions.org
Review your favorite Linux distribution.
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-17-2020, 08:51 AM   #31
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972

Quote:
Originally Posted by Turbocapitalist View Post
It is in POSIX shell, of which Bash is a superset.

However, it is really close but is missing some essential changes to prevent it from providing backdoors to the system. If this is being served to the public over HTTP or HTTPS it would be very important to validate the input data to make sure it is what it needs to be and not something sneaky instead. As it stands, someone could feed $1 something malevolent to cause trouble with the touch or echo lines.
Quite true; but as of yet (two pages in), we *STILL* don't know what the OP actually wants to do, and they don't know either, according to post #20.
 
1 members found this post helpful.
Old 08-17-2020, 11:41 AM   #32
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by Turbocapitalist View Post
It is in POSIX shell, of which Bash is a superset.
It's using the non-POSIX new/extended test [[ so it wont work on systems where /bin/sh either links to Dash/etc or triggers POSIX-compliance mode (which I believe is the case with Bash).

But anyway, the OP is either a troll and/or a help vampire, so unless/until they're willing to put effort into asking their questions here appropriately, I don't think it's worth wasting effort trying to explain.

 
3 members found this post helpful.
Old 08-19-2020, 08:58 AM   #33
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
That code above is bunk. It’s like a big toe in the water. DUGAN has the right idea! It is GO. I don’t know GO so I am probably left out. But he wants to map anyone to many. You laugh but FACEBOOK does this and makes a ton of $. They access of millions of pages for free.
What the above script points to is a list of files and the creation of files. You have to then figure out the mapping. Maybe you can do this in peri. I haven’t done it yet.
 
Old 08-19-2020, 09:21 AM   #34
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by Fred27377 View Post
That code above is bunk. It’s like a big toe in the water. DUGAN has the right idea! It is GO. I don’t know GO so I am probably left out. But he wants to map anyone to many. You laugh but FACEBOOK does this and makes a ton of $. They access of millions of pages for free.
What the above script points to is a list of files and the creation of files. You have to then figure out the mapping. Maybe you can do this in peri. I haven’t done it yet.
Sorry, no. You **STILL** have not defined what it is you're actually trying to do, and have gone back and forth from bash scripts, perl, go, etc., and as of yet don't know what you actually want to accomplish. And you obviously have zero idea of how relational databases work, or even the basics of how a site like Facebook operates behind the scenes.

You have no actual goal, which means you have no clear tasks to accomplish since you have no idea what it is you actually want to DO. And based on your posts, have VERY little knowledge of how any of this works, apparently. Do you even know what a redirect IS? The ways to accomplish it? WHY you want to? Do you know what a reverse proxy is? These are all things in this very thread. If you don't know any of this and have no clear goal, why are you bothering to post here???
 
1 members found this post helpful.
Old 08-19-2020, 03:59 PM   #35
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
Code:
perl

use LWP::Simple
my $res = get($url);

then search the url against a list of files.
a match would display the file.
Too simple yes or no ?
 
Old 08-19-2020, 04:04 PM   #36
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
I once remember OCLUG a linux user group. This was years ago. Someone who did linux for a living was stuck and couldn't solve a problem. They literally tried for a month till they got it right. Ill never forget that.
 
Old 08-20-2020, 01:09 AM   #37
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 Fred27377 View Post
I once remember OCLUG a linux user group. This was years ago. Someone who did linux for a living was stuck and couldn't solve a problem. They literally tried for a month till they got it right. Ill never forget that.
This is not that situation, as TB0ne and others pointed out repeatedly.
 
1 members found this post helpful.
Old 08-20-2020, 07:25 AM   #38
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by Fred27377 View Post
Code:
perl

use LWP::Simple
my $res = get($url);

then search the url against a list of files.a match would display the file.
Too simple yes or no ?
No idea, because we **STILL DO NOT KNOW WHAT YOU ARE TRYING TO DO**. You've been given NUMEROUS things (and I even handed you a redirect in Perl) so far. You seem to have selective blindness when it comes to questions we're asking you, since you only seem to address what you feel like seeing.
Quote:
Originally Posted by Fred27377
I once remember OCLUG a linux user group. This was years ago. Someone who did linux for a living was stuck and couldn't solve a problem. They literally tried for a month till they got it right. Ill never forget that.
How inspirational. But the difference between that person and you, is that they could clearly articulate what they were trying to do, and they had a goal. You apparently have neither.
 
Old 08-20-2020, 02:25 PM   #39
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
Let me begin again.

I want to start with a http request and map it to a page. One request to one page. But I am trying to avoid making and mapping these sites in advance. Their are seven sites on the box and I’m sure there could be 1000 more. But if possible I don’t want physically create the next 1000 sites. If they could be created on the fly it would be wonderful. The sites on the box now are Apache.
 
Old 08-20-2020, 02:25 PM   #40
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
I sorry if it took me so long to get it out!
 
Old 08-20-2020, 02:57 PM   #41
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
I don’t want physically create the next 1000 sites. If they could be created on the fly it would be wonderful. The sites on the box now are Apache.
Something or someone will have to create the sites, there's no magic. Either you create it or use a tool like Ansible or Puppet (or one of the many others) to create it.
Even then what condition would have to be met for the sites to be created, that will need to be programmed.
 
1 members found this post helpful.
Old 08-20-2020, 03:08 PM   #42
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by Fred27377 View Post
Let me begin again.
I want to start with a http request and map it to a page. One request to one page. But I am trying to avoid making and mapping these sites in advance. Their are seven sites on the box and I’m sure there could be 1000 more. But if possible I don’t want physically create the next 1000 sites. If they could be created on the fly it would be wonderful. The sites on the box now are Apache.
...and....
Quote:
Originally Posted by Fred27377
I sorry if it took me so long to get it out!
Seriously?? It took you THIS LONG, after being asked so many questions, to finally answer???

Go back to post #19 and re-read it. AGAIN there is already existing software to create web templates for different sites. Web hosts use it all the time. Look up cPanel, install it, and you're finished. Use the methods dc.901 told you...but at some point YOU, PERSONALLY, are going to have to do some actual work, and put some effort into whatever it is you're trying to accomplish...which we (and apparently you), don't know. And you don't 'map' a request to a page...a domain points to a website/url. That's not a 'redirect'...simple virtual hosting.

Again, you do not appear to have a clear goal, or even basic knowledge of what you're trying to do and accomplish.
 
2 members found this post helpful.
Old 08-20-2020, 09:15 PM   #43
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,246

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Is it fair to say that you just don't want to pre-write static HTML files? That's typically solved with an application server. Apache (or Nginx) passes the HTTP request to an application that you write; you have the application generate the response, and it and passes the response to Apache to send back. You've heard of PHP and Ruby on Rails right? That's what they're for.

Personally, I recommend looking into Django, which is for writing these in Python. The official tutorial should give you a pretty good idea of how these typically work:

https://docs.djangoproject.com/en/3.1/intro/tutorial01/

These application servers typically store persistent data in an SQL database. You'll see that in the Django tutorial.

Last edited by dugan; 08-24-2020 at 03:12 PM.
 
2 members found this post helpful.
Old 08-21-2020, 12:41 AM   #44
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 Fred27377 View Post
I want to start with a http request and map it to a page. One request to one page. But I am trying to avoid making and mapping these sites in advance. Their are seven sites on the box and I’m sure there could be 1000 more. But if possible I don’t want physically create the next 1000 sites. If they could be created on the fly it would be wonderful. The sites on the box now are Apache.
I think you need to start running a server and see how it works; once you do that you will understand that what you wrote there makes very little sense.
As the previous poster dugan, I think you just want to serve a lot of different pages.

Quote:
Originally Posted by TB0ne View Post
No idea, because we **STILL DO NOT KNOW WHAT YOU ARE TRYING TO DO**.
They want to save the world from Covid-19 with "a box with a database of 320 million"!
320 million what, you might ask? As of right now, that is still shrouded in mystery.
 
1 members found this post helpful.
Old 08-24-2020, 12:42 PM   #45
Fred27377
Member
 
Registered: Jun 2020
Posts: 68

Original Poster
Rep: Reputation: Disabled
ODOHO it seems to me that Covid can be tested by Saliva and a computerized record kept. We must be very close to putting this nightmare behind us. I called AWS to ask if they could setup something like this. They sent me an email. I don’t want to wait two years or more to begin to live again. 320 M is the approx people in US. Doing something for me is better than doing nothing at all!
 
  


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 10:12 PM.

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