Answer the question
In order to leave comments, you need to log in
How to implement a "single entry point" without a domain?
hello, general problem. A site with a single point of entry is not launched by ip address. More precisely, it launches only a welcome page,
I'll try in more detail ...
There is Debian, Apache2 and a PHP site with a single entry point. the site is located in the /var/www/site folder.
There is no domain, so the request goes to %IP_ADDRESS%/site (the main page is launched),
but other requests (for example: %IP_ADDRESS%/site/controller/action) are redirected to a 404 page
and swears:
The requested URL /site/controller/action was not found on this server.
the site is operational, before that it worked with the domain, but without it, it doesn’t want to (
site configs in Apache
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/site
ServerName site.com
ServerAlias www.site.kg
ErrorLog /var/log/apache2/site.com-error.log
CustomLog /var/log/apache2/site.com-access.log combined
<Directory "/var/www/site/" >
Options -Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
RewriteEngine On
RewriteBase /site
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
> I don't know where to look. Please help me,
please take a look at:
DocumentRoot /var/www/site ( сайт находится в папке /var/www/site обращаться нужно - %IP_ADDRESS%/ а не %IP_ADDRESS%/site)
ServerName site.com - стереть, вы же по ip обращаетесь, причем тут site.com ?
ServerAlias www.site.kg - стереть
ErrorLog /var/log/apache2/site.com-error.log
CustomLog /var/log/apache2/site.com-access.log combined
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question