I am trying to configure Akeneo With WHM in Centos 6 Apache 2 server.
I am following this tutorials enter link description here
I configured this in ubuntu machine I got no error. The issue I found is with server and php.
When I launch my site I get this following error.
No input file specified.
My httd.conf file below:
<VirtualHost my-ip:80>
ServerName my-domain.co
ServerAlias mail.domain-group.co www.abs-group.co
DocumentRoot /home/user/public_html/pim-community-standard/web/
<Directory "/home/user/public_html/pim-community-standard/web">
AllowOverride None
Require all granted
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</Directory>
<Directory /home/user/public_html/pim-community-standard>
Options FollowSymlinks
</Directory>
<Directory /home/user/public_html/pim-community-standard/web/bundles>
RewriteEngine Off
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/opt/cpanel/ea-php71/root/usr/var/run/php-fpm/897e2bef0970b20f1bbeeae9d7c0de8ba9c47453.sock|fcgi://my-domain.co/"
</FilesMatch>
ServerAdmin webmaster#user-group.co
UseCanonicalName Off
</VirtualHost>
I get the following error in my apache error log.
AH01071: Got error 'Unable to open primary script: /home/user/public_html/pim-community-standard/web/app.php (No such file or directory)\n'
I am struggling with this error for past 2days. Please help me.
Related
I'm trying to deploy a Laravel 5.6 app on a Debian 9 based VPS with Apache, but the server seem to be unable to handle the requests when i try to access the first page,and i keep having
"Internal Server Error The server encountered an internal error or
misconfiguration and was unable to complete your request."
I've already looked at this
Laravel htaccess
Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
https://www.howtoforge.com/tutorial/install-laravel-on-ubuntu-for-apache/
My .htaccess file that i placed inside the public folder
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
The configuration file places inside /etc/apache/sites-available
<VirtualHost *:80>
ServerName picodem.dev
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html/picodem-project/public
<Directory /var/www/html/picodem-project>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I don't have a domain name yet, and the picodem.dev is just dummy, so i'm accessing the app via the Browser using the IP address of the VPS, but i'm still not sure what's causing the problem...
I have just downloaded the latest version of XAMPP with PHP version 7.2.4. I have made a very simple PHP validation for a HTML form and when I press submit it comes up with the following:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.33 (Win32) OpenSSL/1.1.0g PHP/7.2.4
I'd don't know what the problem is as I have tried changing Require none to Require all granted.
Please Help!
I have experienced this problem and found out that localhost link is not configured in
httpd_vhosts.conf.
So I added this line at the bottom part of httpd_vhosts.conf
<VirtualHost *:80>
DocumentRoot "E:/xampp/htdocs"
ServerName localhost
</VirtualHost>
Well, probably this must be happening because the localhost link is not configured in your xamp vhost, try to look for the vhosts configuration file and add the same one there. Just add this block of code making the appropriate path changes until your repository so that you can access the localhost:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#hcode.com.br
DocumentRoot "C:\ecommerce"
ServerName www.hcodecommerce.com.br
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "C:\ecommerce">
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</Directory>
</VirtualHost>
By default in httpd.conf your entire system directory "/" is secured and not allowed access
in httpd.conf:
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
Add the below additional under the above
<Directory /home>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
Change /home to your hosted installation public directory - e.g. /projects or /devsite.local etc...
For more info on Apache see here: https://httpd.apache.org/docs/current/mod/core.html#directory
The 'Options' are typical .htaccess directives - change as needed
The 'AllowOverride All' gives access to the /home folder and everything under it
The 'Require local' makes sure only localhost / 127.0.0.1 has access to folder and files under /home
Hope this helps :D
I have a website made with Symfony 2.8.22 running with Apache 2.4.18. I have RewriteEngine activated in the virtualhost to not show the .php extension in the url. However I have 2 problems. The first one is I do get the .php extension via url. The second problem is I have a loop in the login page; once I input the credentials it reloads the same login page again, and again. That happens in Chrome and Firefox, however in Microsoft Edge that loop wont happen, it just follow to the next page.
Why is that?
Where's my virtualhost file:
<VirtualHost *:80>
ServerName ip.ip.ip.ip
DocumentRoot /var/www/html/website/web
<Directory /var/www/html/website/web>
AllowOverride All
Order Allow,Deny
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteRule (.*)\.php $1 [R=301,L]
</IfModule>
</Directory>
<Directory /var/www/project>
Options FollowSymlinks
</Directory>
ErrorLog /var/log/apache2/error_website.log
CustomLog /var/log/apache2/access_website.log combined
</VirtualHost>
Thanks in advance.
Best regards.
I am not certain why you are trying to forcably remove .php from the web address bar. If you follow the Symfony Configuration guide it will give you an .htaccess file that works and will not display .php extensions:
<VirtualHost *:80>
ServerName domain.tld
ServerAlias www.domain.tld
DocumentRoot /var/www/project/web
<Directory /var/www/project/web>
AllowOverride None
Order Allow,Deny
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeeScript assets
# <Directory /var/www/project>
# Options FollowSymlinks
# </Directory>
# optionally disable the RewriteEngine for the asset directories
# which will allow apache to simply reply with a 404 when files are
# not found instead of passing the request into the full symfony stack
<Directory /var/www/project/web/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog /var/log/apache2/project_error.log
CustomLog /var/log/apache2/project_access.log combined
</VirtualHost>
I keep trying to configure it so that the domain symfony.local would link to the app_dev.php, but I also keep getting forwarded to the xampp page.
My hosts file is:
127.0.0.1 symfony.local
My httpd-vhost is:
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName symfony.local
DocumentRoot "C:\xampp\htdocs\testAS\web"
DirectoryIndex app_dev.php
<Directory "C:\xampp\htdocs\testAS\web">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app_dev.php [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
I'm using Windows 8. Appreciate any feedback.
I assume it's a fairly recent version of xampp? There is a new directive "Require local" that popped up a few years ago. I remember being stumped by it.
<Directory "C:/home/ahundiak/zayso2016/cerad3/web">
## Options Indexes FollowSymLinks
AllowOverride All
Require local ## Add This
</Directory>
<VirtualHost *:80>
ServerName local.api.zayso.org
DocumentRoot "C:/home/ahundiak/zayso2016/cerad3/web"
</VirtualHost>
I am not an expert on configuring this. The above works for me using the Symfony 2 .htaccess file.
may be it issue of your hosts file entry of symfony.local and local ip address or may between them only TAB(on keyboard) require ...
OR if above answer not work follow below
please follow this link Click Here it help you solve your issue of not show symfony project
So yesterday i installed Apache 2.2, PHP 5.3, and MySQL on my Windows 8 Machine. I am using the same vhost / .htaccess files on both but it works on my Mac and not Windows. Basically When i go to "mysite.dev" it renders the homepage of the site, but once i go to any page, such as "mysite.dev/about/" i get a 403 Forbidden Error.
I have verified that Apache runs as "System" on my computer and then made sure all permissions from the site folder to root are set to Full Access for the user/group System.
I've tried many many things and cant figure this out and its rather annoying. Anyways i've posted below all of the settings / logs. Thanks in advanced.
vhosts:
<VirtualHost *:80>
ServerAdmin MyEmail#gmail.com
DocumentRoot "C:/Users/Michael/Dropbox/Sites/onmytv"
ServerName onmytv.dev
ServerAlias www.onmytv.dev
<Directory "C:/Users/Michael/Dropbox/Sites/onmytv">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php/$1 [L]
Error displayed on webpage:
Forbidden
You don't have permission to access /C:/Users/Michael/Dropbox/Sites/onmytv/index.php/about/ on this server.
error.log
[error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /about/ HTTP/1.1 to file
access.log
127.0.0.1 - - [02/Nov/2012:17:57:17 -0400] "GET /about/ HTTP/1.1" 403 256
The solution was to change the following the in .htaccess file
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php/$1 [L]
to
RewriteRule ^(.*)$ index.php/$1 [L]
Thanks #Svetlio for that useful comment :)
Use this:
<VirtualHost *:80>
ServerAdmin MyEmail#gmail.com
DocumentRoot "C:/Users/Michael/Dropbox/Sites/onmytv"
ServerName onmytv.dev
ServerAlias www.onmytv.dev
<Directory "C:/Users/Michael/Dropbox/Sites/onmytv">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow
Allow from all
Require all granted
</Directory>
</VirtualHost>