5

When i update a view file i get the view file from the old path.

I have a domain that points to an IP (vps) where i have a laravel installation.

lets call this 123.com and when i visit the domain i get the old view path, a path to the folder where i copied the laravel installation from.

This folder is nammed var/www/111.com/

After the copy i put the source in var/www/123.com/

When i acccess 123.com i get view files from var/www/111.com/ instead of var/www/123.com/

My .conf is like this in the sites-available i have restarted apache many times with sudo service apache2 restart no luck.

<VirtualHost *:80>
    ServerName 123.com
        ServerAlias www.123.com
    ServerAdmin [email protected]
    DocumentRoot /var/www/123.com/public_html/public
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

The direect IP .conf looks like this.

<VirtualHost *:80>
        ServerName 111.111.dk
        DocumentRoot /var/www/111.111.dk/public/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/111.111.dk/public/>
                AllowOverride All
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Is the problem with my conf setup in apache2/vps?

I have removed the .conf file with sudo a2dissite 111.111.dk.conf and restarted with sudo /etc/init.d/apache2 force-reload no luck there.

I have also tried with

php artisan route:clear

php artisan view:clear

No luck there.

Kind regards.

11
  • Yes, definitely there. Commented Aug 29, 2016 at 21:34
  • I was thinking that, i have a .conf file that points directly to my ip, but not as a domain, just the ip and then you come to another site, is that the problem? Commented Aug 29, 2016 at 21:42
  • did you fix your route.php for this new view? Commented Aug 29, 2016 at 21:43
  • What do u mean @Sachith where should i change the domain, the view looks after in there? Commented Aug 29, 2016 at 21:44
  • If you change a root folder for your project from 111.com to 123.com you have to change it in apache conf as well. Commented Aug 29, 2016 at 21:45

2 Answers 2

11

I finaly figured it out, it was my config file in laravel, bootstrap/cache/config.php that had wrong paths.

so i ran php artisan config:cache and after that everything works :)

Thanks for all your help.

Sign up to request clarification or add additional context in comments.

1 Comment

run sudo ./artisan config:cache in the application root path. not the repo path.
2

Try clearing the caches - via the terminal:

php artisan route:clear

php artisan view:clear

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.