Natan Gameron
Natan Gameron

Reputation: 3

The requested URL /install/index was not found on this server

when trying to access my site glinks.tk I'm redirected to the configuration automatically, but when transferring my site to a VPS Wemin with Virtual Host I got problems, I put the files correctly but upon access I get the following message "The requested URL/install/index was not found on this server. " I've tried everything but I do not know how to solve it, the script I use is the Mighty URL Shortener and it uses two .htaccess one in the root and one in the webroot folder.

.htaccess from root:

DirectoryIndex index.php

# No directory listings
IndexIgnore *

<IfModule mod_rewrite.c>
    RewriteEngine on

    # Uncomment the following line if your webserver's URL is not directly related to physical file paths.
    # Also uncomment it if you are on 1&1 hosting
    #RewriteBase /

    # Comment the following line if you have not a .well-known directory in the root folder.
    RewriteRule ^(\.well-known/.*)$ $1 [L]

    RewriteRule    ^$    /var/www/glinks/webroot/    [L]
    RewriteRule    (.*) /var/www/glinks/webroot/$1    [L]
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php5_module>

</IfModule>
# END cPanel-generated php ini directives, do not edit

<Files 403.shtml>
order allow,deny
allow from all
</Files>

.htaccess from webroot:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Upvotes: 0

Views: 1633

Answers (1)

parmod
parmod

Reputation: 35

cd /etc/apache2/sites-available

sudo cp 000-default.conf mysite.local.conf

sudo nano mysite.local.conf

` ServerName mysite.local

ServerAdmin webmaster@localhost

DocumentRoot /var/www/html/mysite

<Directory /var/www/html/mysite>

AllowOverride All

Require all granted

`

sudo a2ensite mysite.local.conf

ignore this

sudo a2dissite mysite.local.conf (for disable)

systemctl reload apache2

sudo a2enmod rewrite

sudo systemctl restart apache2

Upvotes: 0

Related Questions