I have a blog on wordpress, for example www/blog.com - folder and my site example.com, www/example.com - folder.
I try integrate worpress with my site. example.com/blog - must go to wordpress index page, and example.com/blog/post_name must go to wordpress post.
apache conf
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/example.com
ServerAlias www.example.com
Alias /blog /var/www/blog.com
<Location /blog>
</Location>
</VirtualHost>
<Directory /var/www/example.com>
#code
</Directory>
<Directory /var/www/blog.com>
#code
</Directory>
In worpress admin panel i change:
WordPress Address (URL) to example.com/blog
Site Address (URL) to example.com
Permalink Settings to /blog/%postname%/
When i go to example.com/blog it work fine, but when i type example.com/blog/post_name i have 404 error.
Edit:
request example.com/blog go to wordpress directory, but example.com/blog/post_name go to example.com index.php