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


Reply
  Search this Thread
Old 09-03-2020, 12:20 PM   #1
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Rep: Reputation: Disabled
Apache Alias Help


All,

OK Upgraded to Kubuntu 18.04 LTS and all my projects and files are on my 3T HD located at:

/media/$USER/3Tname/

I had the previous aliases.conf file, so modified it to the new path name, but none of the alias assignments work on defs with theat path name.

Nothing I read tells NOWTO actually fix this, but I'm guessing I need to create a symlink to this path name.

Am I right, or is there another way to do this?

Cheers!

TBNK
 
Old 09-03-2020, 06:22 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by TBotNik View Post
Am I right, or is there another way to do this?
A way other than what? We don't know your way.

Share your configuration, or relevant parts of it.
Tell us what you expect, and what happens actually.
What is $USER?

Last edited by berndbausch; 09-03-2020 at 06:25 PM.
 
Old 09-04-2020, 03:56 AM   #3
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
A way other than what? We don't know your way.

Share your configuration, or relevant parts of it.
Tell us what you expect, and what happens actually.
What is $USER?
berndbausch,

A symlink!

$USER in the system var for the logged in user!

Last edited by TBotNik; 09-04-2020 at 03:58 AM.
 
Old 09-04-2020, 12:00 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
The documentation at apache.org is always the best source to get answers.
Bookmark the parent link of that page.
 
Old 09-05-2020, 06:39 AM   #5
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
It has come to light that this person is running an IT business listing fake "capabilities" to lure and befuddle unsuspecting victims.
A search for their username should turn up 2 wordpress blogs, one of which contains the attached list of "capabilities" as well as a link to another site containing even more nonsense/presumptiousness.

I will not link these sites.

But I think anyone attempting to help someone who's so habitually exaggerating/pretending/overbearing to obviously oversell their questionable services, should know about these things first.
Attached Files
File Type: pdf tbotnik.pdf (44.1 KB, 53 views)
 
3 members found this post helpful.
Old 09-12-2020, 12:56 AM   #6
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
The documentation at apache.org is always the best source to get answers.
Bookmark the parent link of that page.
scasey,

I always use that source, but it does not address this scenario. Here is a sample:
Quote:
Alias "/ads" "/media/$USER/3Tdrive/Syncs/Corporate/Marketing/Ad Campaigns/"
<Directory "/media/$USER/3Tdrive/Syncs/Corporate/Marketing/Ad Campaigns/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
According to the info in the link you sent this should work fine, but not being in the root "/" directory, the "/home", "/var". or the "/var/www" directories, or in otherwords the default drive, it somehow does not render correctly.

What I am asking is can I use a symlink to trick Apache into seeing this drive as a directory on the default drive. The other option I see is a mount statement in the "fstab" file, to give it a fixed directory location in the file system. I think because it is showing under "/media" the system sees it as a temp directory and there Apache will not recognize it.

Correct me if I'm wrong, but I think this is the scenario.

Cheers!

TBNK
 
Old 09-12-2020, 01:04 AM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
No. A symlink is not how to trick Apache to present content outside the DocumentRoot...
Why do you want to do that?
ondoho: Noted…
 
Old 09-16-2020, 09:34 AM   #8
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
No. A symlink is not how to trick Apache to present content outside the DocumentRoot...
Why do you want to do that?
ondoho: Noted…
scasey,
The default drive is only for the OS, all data and projects are on the 3T drive.

Cheers!

TBNK
 
Old 09-16-2020, 02:31 PM   #9
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
If the content is on another drive, make that the DocumentRoot; then no alias would be required.
 
Old 09-17-2020, 10:13 AM   #10
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
If the content is on another drive, make that the DocumentRoot; then no alias would be required.
scasey,

Under the /media/$USER/3T the drive sometimes does not register on boot up, so thinking I need to add it to fstab to make sure it is always there, so the Doc Root will naver fail. Am I right?

TBNK
 
Old 09-17-2020, 04:12 PM   #11
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,738

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
I don't know. Try it and let us know if that works.
 
Old 09-19-2020, 10:08 AM   #12
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
I don't know. Try it and let us know if that works.
Sure
 
Old 10-21-2020, 10:09 PM   #13
TBotNik
Member
 
Registered: May 2016
Location: Greenville, TX
Distribution: Kubuntu 18.04
Posts: 796

Original Poster
Rep: Reputation: Disabled
SCasey,

I think I've tried everything and still not working and need full access to my

/3T/Projects
and
/3T/Syncs/Projects

for my PHP and Frameworks development, but aliases and Virtual Hosts neither are working!

Oh! And everything I'm reading on the Apache site says they should be working!

Hate when I encounter things where I'm not holding/forming my mouth right! He he!

Do I need to PasteBin my apache.conf and my aliases.conf files, for you to inspect?

Cheers!

TBNK

Last edited by TBotNik; 10-21-2020 at 10:14 PM.
 
Old 10-21-2020, 11:48 PM   #14
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
$USER in the system var for the logged in user!
What do you think that means to apache when it starts?

Code:
<Directory "/media/$USER/3Tdrive/Syncs/Corporate/Marketing/Ad Campaigns/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Again, what does that mean to apache?

That makes no sense at all to me. It appears that you expect apache to change the path it serves from based on who logs in to the system... is that right? If so, you need to rethink that.

So once more, what are you expecting the value of $USER to be when apache reads that config file?

Last edited by astrogeek; 10-21-2020 at 11:52 PM.
 
Old 10-22-2020, 06:55 PM   #15
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
What do you think that means to apache when it starts?

Code:
<Directory "/media/$USER/3Tdrive/Syncs/Corporate/Marketing/Ad Campaigns/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Again, what does that mean to apache?

That makes no sense at all to me. It appears that you expect apache to change the path it serves from based on who logs in to the system... is that right? If so, you need to rethink that.

So once more, what are you expecting the value of $USER to be when apache reads that config file?
astrogeek,

I went to "fstabs" and entered the 3 TB drive so now on boot it mounts as just "3T". Now my aliases.comf file reads for one new link:

Quote:
Alias "/WRU" "/3T/Syncs/pathinfo/Webs-R-Us/"
<Directory "/3T/Syncs/pathinfo/Webs-R-Us/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Which should assign the declared directory to "localhost/WRU" in the browser, but it is not and also not rendering any of the .PHP files, which is declared in the /etc/apache2/apache.conr file.

Not really sure what you are asking, but that is my understanding of an alias!

Cheers!

TBNK
 
  


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 04:06 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