Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

server / virtual host / www - symlink

redirected www folder to symlink / utilization virtual host

9:06 pm on Jun 11, 2019 (gmt 0)

New User

joined:June 11, 2019
posts: 1
votes: 0

Hey Everyone,

I'm running centos 7 and I have apache version 2.4.6 installed.

I'm a web developer, and creating a development scenario via local network. This maybe a little complicated...not sure...new to linux & apache.

Box 1: Centos 7 - Server - Apache 2.4 / NFS (/srv/web-dev/project1 ... /srv/web-dev/project2...etc.)
Box 2: Centos 7 - Workstation with NFS mounted for saving workstation files to project directory on server
Box 3: Macbook - for graphical / adobe image / NFS mounted for saving images to project directory on server

Where on the Server box I created a symlink. Normally web pages are served up from /var/www, so I renamed it to /var/www_org, then I created a symlink with the follow CLI / cmd .

Ln -s /srv/web-dev /var/www which should create a re-direct point for anything looking for a the folder www to that /srv/web-dev directory
(note the capital L is used to denote a the "l" which could be confused as an 'i' in this typography)

SO, I'm also using Webmin. IN Webmin under {Servers} then [Apache Webserver] I can create virtual hosts.

I've tried a bunch of different port numbers including 80.
Document Root > /srv/web-dev/project1
Servername > automatic
It creates the virtual server.

I go to macbook - open browser address bar => 1xx.xxx.xxx.xxx:80 >>> 404 -> not found

I've checked the httpd.conf and confirmed via netstat -TLPN that httpd is listening on :::80

I'm just wondering where I may be going wrong.

The goal is, as each project folder is created on the NFS that apache serves the pages up from there via virtual host which is created for each project

example: /srv/web-dev/project1 (on NFS)

Virtual Server connection via browser
> 1xx.xxx.xxx.xxx:80 >> /srv/web-dev/project1/index.html
> 1xx.xxx.xxx.xxx:5034 >> /srv/web-dev/project2/index.html

and thus each virtual server directly relates to each project, however; it is possible, and probably less of a head-ache, if I simply used the same port and simply deleted and re-created each virtual server as I needed it. So in reality it might look something like this,
VH Server Via browser address
> 1xx.xxx.xxx.xxx:80 > /srv/web-dev/project1/index.html
delete this virtual host and re-create for
> 1xx.xxx.xxx.xxx:80 > /srv/web-dev/project2.index.html

I look forward to your thoughts, ideas and feedback.

Best Wishes, and thanks in advance,

-Scatterbrainz (LOL)

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members