0

I have vhost with following conf (localhost.conf) file (this needs to be like this in order for an app I am working on to work properly (please don't ask why I didn't make the setup)):

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName localhost
    #ServerAlias www.wp.dev
    DocumentRoot /home/sasha/Documents/Scopic/STS/project/timesheetapprovalsgit/timesheet_ui/web

    <Directory /home/sasha/Documents/Scopic/STS/project/timesheetapprovalsgit/timesheet_ui>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
        require all granted
    </Directory>
</VirtualHost>

I am trying to add new vhost (prst.conf):

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName prst.app
    ServerAlias www.prst.app
    DocumentRoot /home/sasha/Documents/Scopic/PerformanceReview/project/performance-review-status-tracking/public

    <Directory /home/sasha/Documents/Scopic/PerformanceReview/project/performance-review-status-tracking>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
        require all granted
    </Directory>
</VirtualHost>

My hosts file:

127.0.0.1   localhost
127.0.0.1   www.prst.app

The main issue I have at the moment is that whenever I go to www.prst.app, I am redirected to the localhost. Does anyone have an idea what am I doing wrong here?

1 Answer 1

2

Your server name is defined as:

  ServerName prst.app

so define in /etc/hosts prst.app not www.prst.app

127.0.0.1   prst.app

To access www.prst.app create new virtual host and new record in /etc/hosts

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.