Operating System & Version
CentOS 7.9
cPanel & WHM Version
92.0.5

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
hi

i have big problem with python in cpanel. we are using cpanel + cloudlinux for python applications and all of persian urls have 404 error.
i.e :site.com/category/%D9%81%D8%AA%D9%88%DA%AF%D8%B1%D8%A7%D9%81%DB%8C_%D8%B1%DB%8C%D9%86%D9%88%D9%BE%D9%84%D8%A7%D8%B3%D8%AA%DB%8C/

i want to know how can i fix it?! should i change something on web server or change my code!?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,981
921
313
cPanel Access Level
Root Administrator
Hey there! When this issue has come up in the past, users have reported good results by following the details at this link:


Can you check that and see if that helps with this particular issue?
 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
i had convert my files with convmv and install iconv for server but still have problem. this is example url site.com/en/تب/ and isn't work.
i don't know should i change apache setting or passenger ?

same project is working on another location but this is not works on my server.

note : i had using setup python app for run python applications.
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,981
921
313
cPanel Access Level
Root Administrator
I checked the link you provided in your last response (which I removed for security reasons) and I don't see that system is using cPanel. Would it be possible for you to check the configuration on that server to see if there are differences there? You can also open a ticket with our team directly using the link in my signature so we can examine the machine for you.
 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
this really important for me and all persian language clients to see urls with persian characters. and i want to know is this problem from apache or passenger?!
if you tell me which one is problem i can follow up the solution?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,981
921
313
cPanel Access Level
Root Administrator
I don't believe there is a good way to answer that without testing. The best way to find out would be to disable Passenger and see if you still experience the issue with only Apache running on the system, as that would help isolate the issue.
 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
Is it possible for Python code to work without a passenger? i think whole python project are handled with passenger in Cpanel+ Cloudlinux.
can you give us a command to test that?!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,981
921
313
cPanel Access Level
Root Administrator
There are currently two options to get Python working on a cPanel system. The first option would be to install the package from the EA4-experimental.repo. If you would like to try that, you can run the following command to get that repository setup:

Code:
yum install ea4-experimental
and then this command would install the package:

Code:
yum install ea-apache24-mod_wsgi
The second option, would be to use the full Passenger installation as outlined here:

 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
i have try this method and url problem is resolved but i got 2 problems.
first is this method have conflict with mod_alt_passenger and will disabled all deployed applications with alt_passenger!
second its not work with domain and client can run his project with main server IP and port (ex: 1.1.1.1:8000) and it was really unsafe for shared hosting.

and a big question. What is the difference between this method and that one? i mean special characters URL is works in this method but not works in other one.

what solution you have for this problems?
 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
i said when you want install mod_wsgi cpanel was alert conflict with mod_alt_passenger and you cant install that. we disabled alt passger for test and installed mod_wsgi but as i said that method have 2 major problem.

my question is what difference is between this methods to URLs for special characters? cuz in your method URL is true but deployment have problems.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,981
921
313
cPanel Access Level
Root Administrator
There isn't really a "difference" as they are just different tools to get to the same result. Passenger is just different software for serving content.

It may be best to open a ticket with our team so we can check the machine directly. You can do that through WHM or using the link in my signature.
 

nima ebrahimi

Member
Jul 5, 2019
10
0
1
Iran
cPanel Access Level
Root Administrator
@chrislyn this is our customer's 404 error page.

Code:
Using the URLconf defined in task.urls, Django tried these URL patterns, in this order:

robots.txt
admin/
[name='index']
en/(?P<persian_slug>[-\w]+)/ [name='post_persian']
fa/(?P<persian_slug>[\w-]+)/ [name='post']
^media/(?P<path>.*)$
^static/(?P<path>.*)$
The current path, fa/%d8%aa%d8%a8/, didn't match any of these.
i want to know shoud i change anything on server config or customer should be change his code?!