Forums › Forums › OroCRM › OroCRM – Installation/Technical Issues or Problems › 404 Not Found for incorrect Apache configuration
This topic contains 8 replies, has 4 voices, and was last updated by Mike Kudelya 7 years, 3 months ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- October 24, 2016 at 1:20 am #27433
Hello,
I have a problem that apache configuration. Here my virtual host setting.
Shell1234567891011121314<VirtualHost *:80>ServerName orocrm.75cl.sgDirectoryIndex app.phpDocumentRoot /var/www/html/oro/web<Directory /var/www/html/oro/web># enable the .htaccess rewritesAllowOverride AllRequire all granted</Directory>ErrorLog /var/log/apache2/error.logCustomLog /var/log/apache2/access.log combined</VirtualHost>But, when I access to other menus, http://orocrm.75cl.sg/oro/web/app.php/ is always shown in front of the my targeted menu. So, it was shown 404 page. e.g http://orocrm.75cl.sg/oro/web/app.php/magento/cart/. It should be like that http://orocrm.75cl.sg/app.php/magento/cart/
I just follow this instruction. I think that instruction have some typo error the following two line.
Shell12DocumentRoot [$folder_location]}/orocrm/web<Directory [$folder_location]}/orocrm/web>Please help me to fix it this issue.
Regards,
Kelvin - CreatorTopic
- AuthorReplies
- October 25, 2016 at 1:09 am #27434
Looks like you don’t have the rewrite module enabled in Apache. Do you?
October 25, 2016 at 1:24 am #27435Here my enabled module
Shell1234567891011121314151617181920212223242526272829core_module (static)so_module (static)watchdog_module (static)http_module (static)log_config_module (static)logio_module (static)version_module (static)unixd_module (static)access_compat_module (shared)alias_module (shared)auth_basic_module (shared)authn_core_module (shared)authn_file_module (shared)authz_core_module (shared)authz_host_module (shared)authz_user_module (shared)autoindex_module (shared)deflate_module (shared)dir_module (shared)env_module (shared)filter_module (shared)headers_module (shared)mime_module (shared)mpm_prefork_module (shared)negotiation_module (shared)php7_module (shared)rewrite_module (shared)setenvif_module (shared)status_module (shared)October 27, 2016 at 2:37 am #27436Hi
Here is my virtual host and i successfully open http://orocrm-application.local/app_dev.php:
INI12345678910111213141516<VirtualHost *:80>ServerAdmin ..@gmail.comDocumentRoot "/Library/WebServer/www/symfony/platform-application/web"ServerName platform-application.localServerAlias platform-application.local<Directory "/Library/WebServer/www/symfony/platform-application/web"># enable the .htaccess rewritesAllowOverride AllOrder allow,denyAllow from all</Directory>ErrorLog "logs/platform-application-error.log"CustomLog "logs/platform-application-access.log" common</VirtualHost>I think http://orocrm.75cl.sg/oro/web/app.php is wrong url. Your document root already has been set to
/oro/web, why do you add /oro/web to your url ? Try http://orocrm.75cl.sg/app.phpJanuary 11, 2017 at 1:06 am #27437Hi there
I am having the same issue. Here are the details;
document root is /var/www/html/orocrm/web
In my .conf file for this virtual host i have this set in the documentRoot as well as in the <Directory> ie <Directory /var/www/html/orocrm/web>
My url us crm.example.com. This works fine and i can log in and see the dashboard. But when selecting logout or perhaps going to a menu item like jobs it comes up like this
crm.example.com/app.php/orocrm/web/app.php/message-queue/jobs
rather than
crm.example.com/app.php/message-queue/jobs.If i remove the extra documentRoot info from the URL it works fine, so I am sure its an apache thing.
My virtual host file looks the same as Kelvin Kyaw with the extra option of “Allow from all” in my Directory options.
Any help would be great as i really want to get stuck into using OroCRM.
January 11, 2017 at 1:16 am #27438I have also just noticed that if i go to app_dev.php manually or set it as the DocumentIndex, the issue goes away… if i change back to app.php, issues happen again.
Thanks in advance
January 11, 2017 at 8:04 am #27439Hi
Issue still appear when will you run this commands?
Shell12app/console oro:assets:install --env=dev --symlinkapp/console assetic:dump --env=devJanuary 11, 2017 at 7:33 pm #27440Yes it does
Here is my apache config and i have confirmed that MOD_REWRITE has been enabled and I am only running 1 version of PHP, version 7.0.
The only thing i can think of that i did different from the install was using composer from the Ubuntu Software reop as well as the nodejs from Ubuntu Repo. I am running Ubuntu 16.04.1 LTS
Thanks again
PHP12345678910111213141516171819202122232425<VirtualHost *:80>ServerName crm.example.comServerAdmin webmaster@localhostDocumentRoot /var/www/html/orocrm/webDirectoryIndex app.php<Directory /var/www/html/orocrm/web>AllowOverride AllOrder allow,denyallow from all</Directory># Available loglevels: trace8, ..., trace1, debug, info, notice, warn,# error, crit, alert, emerg.# It is also possible to configure the loglevel for particular# modules, e.g.#LogLevel info ssl:warnErrorLog ${APACHE_LOG_DIR}/oro_error.logCustomLog ${APACHE_LOG_DIR}/oro_access.log combined</VirtualHost># vim: syntax=apache ts=4 sw=4 sts=4 sr noetJanuary 12, 2017 at 6:30 am #27441Try to find differences between my and your configuration. This config is working on orocrm 1.9.*, 1.10.*, 2.0. I’m using apache 2.2.31, php 7.0. .htaccess file in web folder i leave default.
Here is my vhosts.conf:
INI12345678910111213141516<VirtualHost *:80>ServerAdmin my@gmail.comDocumentRoot "/Library/WebServer/www/symfony/orocrm-application/web"ServerName orocrm-application.localServerAlias orocrm-application.localSetEnv ORO_PHP_PATH /opt/local/bin/php<Directory "/Library/WebServer/www/symfony/orocrm-application/web">AllowOverride AllOrder allow,denyAllow from all</Directory>ErrorLog "logs/orocrm-application-error.log"CustomLog "logs/orocrm-application-access.log" common</VirtualHost>Here is my httpd.conf:
INI123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173ServerRoot "/opt/local/apache2"Listen 80LoadModule authn_file_module modules/mod_authn_file.soLoadModule authn_dbm_module modules/mod_authn_dbm.soLoadModule authn_anon_module modules/mod_authn_anon.soLoadModule authn_dbd_module modules/mod_authn_dbd.soLoadModule authn_default_module modules/mod_authn_default.soLoadModule authn_alias_module modules/mod_authn_alias.soLoadModule authz_host_module modules/mod_authz_host.soLoadModule authz_groupfile_module modules/mod_authz_groupfile.soLoadModule authz_user_module modules/mod_authz_user.soLoadModule authz_dbm_module modules/mod_authz_dbm.soLoadModule authz_owner_module modules/mod_authz_owner.soLoadModule authz_default_module modules/mod_authz_default.soLoadModule auth_basic_module modules/mod_auth_basic.soLoadModule auth_digest_module modules/mod_auth_digest.soLoadModule file_cache_module modules/mod_file_cache.soLoadModule cache_module modules/mod_cache.soLoadModule disk_cache_module modules/mod_disk_cache.soLoadModule mem_cache_module modules/mod_mem_cache.soLoadModule dbd_module modules/mod_dbd.soLoadModule dumpio_module modules/mod_dumpio.soLoadModule reqtimeout_module modules/mod_reqtimeout.soLoadModule ext_filter_module modules/mod_ext_filter.soLoadModule include_module modules/mod_include.soLoadModule filter_module modules/mod_filter.soLoadModule substitute_module modules/mod_substitute.soLoadModule deflate_module modules/mod_deflate.soLoadModule log_config_module modules/mod_log_config.soLoadModule log_forensic_module modules/mod_log_forensic.soLoadModule logio_module modules/mod_logio.soLoadModule env_module modules/mod_env.soLoadModule mime_magic_module modules/mod_mime_magic.soLoadModule cern_meta_module modules/mod_cern_meta.soLoadModule expires_module modules/mod_expires.soLoadModule headers_module modules/mod_headers.soLoadModule ident_module modules/mod_ident.soLoadModule usertrack_module modules/mod_usertrack.soLoadModule unique_id_module modules/mod_unique_id.soLoadModule setenvif_module modules/mod_setenvif.soLoadModule version_module modules/mod_version.soLoadModule proxy_module modules/mod_proxy.soLoadModule proxy_connect_module modules/mod_proxy_connect.soLoadModule proxy_ftp_module modules/mod_proxy_ftp.soLoadModule proxy_http_module modules/mod_proxy_http.soLoadModule proxy_scgi_module modules/mod_proxy_scgi.soLoadModule proxy_ajp_module modules/mod_proxy_ajp.soLoadModule proxy_balancer_module modules/mod_proxy_balancer.soLoadModule ssl_module modules/mod_ssl.soLoadModule mime_module modules/mod_mime.soLoadModule dav_module modules/mod_dav.soLoadModule status_module modules/mod_status.soLoadModule autoindex_module modules/mod_autoindex.soLoadModule asis_module modules/mod_asis.soLoadModule info_module modules/mod_info.soLoadModule cgi_module modules/mod_cgi.soLoadModule dav_fs_module modules/mod_dav_fs.soLoadModule vhost_alias_module modules/mod_vhost_alias.soLoadModule negotiation_module modules/mod_negotiation.soLoadModule dir_module modules/mod_dir.soLoadModule imagemap_module modules/mod_imagemap.soLoadModule actions_module modules/mod_actions.soLoadModule speling_module modules/mod_speling.soLoadModule userdir_module modules/mod_userdir.soLoadModule alias_module modules/mod_alias.soLoadModule rewrite_module modules/mod_rewrite.soLoadModule php7_module modules/mod_php70.so<IfModule !mpm_netware_module><IfModule !mpm_winnt_module>User mkudelyaGroup www</IfModule></IfModule>ServerAdmin you@example.comDocumentRoot "/Library/WebServer/www"<Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowDeny from all</Directory><Directory "/Library/WebServer/www">Options Indexes FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all</Directory><IfModule dir_module>DirectoryIndex index.html</IfModule><Files ~ "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">Order allow,denyDeny from allSatisfy All</Files><Files "rsrc">Order allow,denyDeny from allSatisfy All</Files><DirectoryMatch ".*\.\.namedfork">Order allow,denyDeny from allSatisfy All</DirectoryMatch>ErrorLog "logs/error_log"LogLevel warn<IfModule log_config_module>## The following directives define some format nicknames for use with# a CustomLog directive (see below).#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b" common<IfModule logio_module># You need to enable mod_logio.c to use %I and %OLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio</IfModule>CustomLog "logs/access_log" common</IfModule><IfModule alias_module>ScriptAlias /cgi-bin/ "/opt/local/apache2/cgi-bin/"</IfModule><IfModule cgid_module>## ScriptSock: On threaded servers, designate the path to the UNIX# socket used to communicate with the CGI daemon of mod_cgid.##Scriptsock logs/cgisock</IfModule><Directory "/opt/local/apache2/cgi-bin">AllowOverride NoneOptions NoneOrder allow,denyAllow from all</Directory>DefaultType text/plain<IfModule mime_module>TypesConfig conf/mime.typesAddType application/x-compress .ZAddType application/x-gzip .gz .tgz</IfModule># Virtual hostsInclude conf/extra/httpd-vhosts.conf<IfModule ssl_module>SSLRandomSeed startup builtinSSLRandomSeed connect builtin</IfModule>Include conf/extra/mod_php70.conf - AuthorReplies
The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.